What does terraform plan do and why should you always review it before applying?

Easy Topic: Terraform May 24, 2026

terraform plan creates an execution plan — a preview of what Terraform will do before it actually makes changes. It shows additions, modifications, and destructions.

Always review the plan because:

  • It may show unexpected destructions (e.g., a stateful database being replaced instead of modified)
  • It catches misconfiguration before real infrastructure is affected
  • In a CI/CD pipeline, save the plan output and apply that exact plan in the next step to ensure consistency
terraform plan -out=tfplan
terraform apply tfplan
← Previous How do you manage multiple environments (dev/staging/prod) in... Next → How do Terraform modules work and what makes...

Practice Similar Questions

Back to Terraform Topics