Which command creates an execution plan in Terraform?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

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