What are the main Terraform commands?
Answer
The core Terraform workflow uses these commands: terraform init: initializes the working directory — downloads provider plugins and modules, creates the .terraform directory. Run this first and after any provider/module changes. terraform plan: shows what changes will be made (add, change, destroy) without actually applying them. The plan is the most important safety check. terraform apply: applies the planned changes. Prompts for confirmation unless --auto-approve is used. terraform destroy: destroys all resources managed by the configuration. terraform validate: checks HCL syntax and configuration correctness without accessing APIs. terraform fmt: formats code to canonical style. terraform output: displays output values. terraform state: manage state (list, show, move, remove resources). terraform import: bring existing resources into Terraform management.