Preheat oven to 350 F. Grease and flour a 9x13-inch baking pan. I use a nonstick baking spray with flour in it.
In a medium bowl, whisk together flour, cinnamon, baking soda, and salt together. Set aside.
In a large bowl, beat together buttermilk, oil, and sugar until well-combined.
Mix in eggs, one at a time, until combined.
Stir in vanilla.
Add pineapple and carrots; stir until just incorporated.
Stir in flour mixture until just combined.
Add coconut and nuts, if using. Stir until just combined. Batter will be wet.
Pour batter into prepared baking pan, smoothing as necessary.
Bake for 30-40 minutes, or until a wooden toothpick inserted in the center comes out clean.
To make the buttermilk glaze
While the cake is baking, prepare the buttermilk glaze.
In a saucepan, combine, sugar, buttermilk, butter, and baking soda. Use a large enough saucepan to allow mixture to bubble up as it cooks.
Bring mixture to a boil, stirring constantly.
Boil for 4 minutes.
Remove from heat, and stir in vanilla. You should have 1/2 cup of buttermilk glaze.
When the cake is finished baking, remove from oven.
Immediately brush buttermilk glaze over hot cake.
Let cake cool in the pan on a wire rack to room temperature.**
To make the cream cheese frosting
Beat cream cheese and butter together until light and fluffy.
Add powdered sugar and vanilla; beat until smooth.
Turn mixer up to high and beat for an additional 2-3 minutes.
Drop spoonfuls of frosting over the cake.
Carefully spread the spoonfuls together to cover the cake. Spreading in one direction will help to prevent the cake from coming up into the frosting.
Store any leftover cake covered in the refrigerator.
*I pour the juice off, but I don't squeeze the pineapple dry.**There may still be a layer of glaze on the cake when you frost it. I've found that it soaks into the cake completely if I chill the cake. If you're worried about frosting the cake with that layer of glaze still there, just cover the cake, and let it chill for a bit. Then, frost as you normally would. ***Nutrition facts are estimates.