The city of Calgary requires a deck to have a building permit if:
A new deck is higher than 2 feet above grade at any point or you are replacing/rebuilding an existing deck that is higher than 2 feet above grade or If your deck has a roof it is required to have a building permit.