Preheat oven to 350 F. Grease and line the bottom of two 8-inch pan with parchment paper.
Sift together the dry ingredients in a large bowl.
Add the sugar, vegetable oil, eggs, and vanilla extract. Stir to combine.
Add in the carrots, flaked coconuts, walnuts (if using), and pineapple. Stir to combine.
Scrape half the cake batter into each prepared pan. Place the cake pans in the oven and bake for 45 minutes, rotating halfway through, until the cakes are golden brown and a cake tester inserted into the center of the cake comes out clean.
Remove the pans to a wire rack and let cool 5 minutes, before removing the cakes from the pans. Let fully cool and, if you have time, chill in the refrigerator or freezer to make the slicing easier.
To make the creamy frosting:
In the bowl of a stand mixer, using a paddle attachment, beat the softened cream cheese on medium speed until smooth. Add in the sour cream and powdered sugar and beat on low speed until fluffy and without lumps.
Switch to the whip attachment and whisk in the heavy cream and vanilla extract until the frosting is stiff, with a mousse-like texture.
To assemble:
Slice the tops off of each cake and then slice each cake in half. You should have four cake layers. Place one cake half on a cake stand. Cover the top of the first layer with icing. Top with another cake half. Repeat, alternating frosting and cake, ending with the flat bottom half of a cake. Ice the tops and sides and decorate.