This is dependent on the size of the pergola and the local building regulations. It is recommended to coordinate with the relevant authorities in advance.