The order these usually run in a typical session
You won't run all eight every time, but when you do use several together, this is the order they tend to happen in — each one assumes the one before it already succeeded.
- terraform init — set up the working directory once, before anything else.
- terraform fmt — tidy up formatting before committing changes.
- terraform validate — catch structural mistakes early, without touching Azure.
- terraform plan — preview exactly what would change.
- terraform apply — make the real Azure changes.
- terraform destroy — remove everything, when you're done.
- terraform output — read back the values a completed run produced.
- terraform test — run automated checks any time, independent of the steps above.
Pick a command go deeper
terraform init
Prepares the working directory: downloads the provider and connects to state.
Command 2 of 8terraform fmt
Rewrites files into consistent, canonical formatting.
Command 3 of 8terraform validate
Checks the configuration for structural mistakes, offline.
Command 4 of 8terraform plan
Previews exactly what would change, before anything happens.
Command 5 of 8terraform apply
Actually creates or updates the real Azure resources.
Command 6 of 8terraform destroy
Removes everything Terraform created, cleanly.
Command 7 of 8terraform output
Reads back the values published in outputs.tf.
Command 8 of 8terraform test
Runs automated checks against a mock provider, no Azure required.