In the Terraform provisioning workflow, which statement is correct?

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

In the Terraform provisioning workflow, which statement is correct?

Explanation:
Terraform provisioning follows a sequence: initialize the working directory, generate a plan, then apply that plan. The statement that plan is performed before apply is the best answer because the plan step creates an execution plan by comparing the desired configuration with the current state. It shows exactly what would be created, changed, or destroyed, without making any actual changes to resources. Only after reviewing this plan do you run apply to enact those changes and update the real infrastructure. Init is not optional in typical workflows because it prepares the working directory by downloading providers and modules and setting up the backend. Without it, plan and apply can fail or be unable to determine what to do. Validate is a separate check that verifies syntax and basic configuration correctness; it does not apply changes to resources. So the correct statement captures the proper order and purpose: plan precedes apply, enabling you to review changes before they’re executed.

Terraform provisioning follows a sequence: initialize the working directory, generate a plan, then apply that plan. The statement that plan is performed before apply is the best answer because the plan step creates an execution plan by comparing the desired configuration with the current state. It shows exactly what would be created, changed, or destroyed, without making any actual changes to resources. Only after reviewing this plan do you run apply to enact those changes and update the real infrastructure.

Init is not optional in typical workflows because it prepares the working directory by downloading providers and modules and setting up the backend. Without it, plan and apply can fail or be unable to determine what to do.

Validate is a separate check that verifies syntax and basic configuration correctness; it does not apply changes to resources.

So the correct statement captures the proper order and purpose: plan precedes apply, enabling you to review changes before they’re executed.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy