Condo association can ban owners from renting

condo
condo

It's every real estate investor's worst nightmare: you buy a condo as a rental property, get a tenant, and everything's going great.

You're getting positive cash flow, paying down the mortgage, and getting a bit of appreciation and tax savings to boot.

And then the association decides that you're not allowed to rent it out anymore.

Can they do that?