It depends on your local regulations and the size of the gazebo.
However, note that almost all cities will require permits and zoning for permanent gazebos, especially those attached to a building. This is because these are typically considered a long-term addition to your property and might influence things like property tax.