Buildings like the one on the right near me have something like community gardens, but exclusive to the residents.
I don’t know exactly how it works, but it seems residents who want a garden have one, and those who don’t aren’t forced to maintain exactly X cm high grass.