Generally speaking you need a permit to construct or install any type of structure in your yard. A pergola has to be engineered and permitted like any other structure. There are foundations that have to be poured and column sizes that have to be determined as well as fastening devices for the various cross members. They also have to comply with specific setback requirements of each municipality.