Preheat the oven to 350 degrees and prepare a 9 by 13 pan, affiliate link, by spraying with non-stick cooking spray.
Finely shred the zucchini on a box grater until you have 2 cups of shredded zucchini. Set aside.
In a large bowl, whisk together the eggs. Add the buttermilk, oil and granulated sugar. Whisk to combine. Pour in the sourdough discard and vanilla extract. Whisk until completely incorporated and smooth.
In a small bowl, use a fork to incorporate the flour, cocoa powder, salt, baking soda and baking powder. Fluff with a fork until completely combined.
Pour the dry ingredients on top of the liquid ingredients and mix together with a wooden spoon or spatula. Add the shredded zucchini and mix together until just incorporated.
Pour the batter into the prepared pan and bake for about 30 minutes. Stick a knife or toothpick in the middle of the cake to check for doneness. The cake will be very moist, rise and spring back lightly when touched with your finger. Once baked through, allow the cake to cool.