Which command creates an execution plan in Terraform?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Which command creates an execution plan in Terraform?

Explanation:
Creating an execution plan means generating a preview of what Terraform will do to reach the desired state defined in your configuration, without making any real changes. The command that does this is terraform plan. It compares your configuration to the current state, then shows additions, updates, or deletions that would occur. You can review this plan before applying it, and you can even save it to a file with -out to apply exactly that plan later. The other commands serve different roles: terraform apply actually applies changes to infrastructure (often after or with a plan), terraform destroy removes resources, and terraform fmt formats your configuration. So, the command that creates the execution plan is terraform plan.

Creating an execution plan means generating a preview of what Terraform will do to reach the desired state defined in your configuration, without making any real changes. The command that does this is terraform plan. It compares your configuration to the current state, then shows additions, updates, or deletions that would occur. You can review this plan before applying it, and you can even save it to a file with -out to apply exactly that plan later. The other commands serve different roles: terraform apply actually applies changes to infrastructure (often after or with a plan), terraform destroy removes resources, and terraform fmt formats your configuration. So, the command that creates the execution plan is terraform plan.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy