Which statement about Terraform apply is true?

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 statement about Terraform apply is true?

Explanation:
The action that actually makes changes to your infrastructure and records those changes in Terraform’s state is the execution step. It takes what you’ve defined in your configuration (and what Terraform already knows from the state) and carries out the necessary create, update, or destroy actions against the real providers. As those changes are applied, the state file is updated to reflect the new real-world resources and their identifiers, so future runs have an correct picture of what exists. This is not merely a syntax check, and it’s not limited to updating a plan—the plan is only the blueprint for what should happen. If your configuration removes resources, apply will destroy them as part of reconciling the desired state. You can apply a pre-generated plan or have Terraform generate and apply the plan, with optional auto-approval, but the core effect is enacting changes and updating state.

The action that actually makes changes to your infrastructure and records those changes in Terraform’s state is the execution step. It takes what you’ve defined in your configuration (and what Terraform already knows from the state) and carries out the necessary create, update, or destroy actions against the real providers. As those changes are applied, the state file is updated to reflect the new real-world resources and their identifiers, so future runs have an correct picture of what exists. This is not merely a syntax check, and it’s not limited to updating a plan—the plan is only the blueprint for what should happen. If your configuration removes resources, apply will destroy them as part of reconciling the desired state. You can apply a pre-generated plan or have Terraform generate and apply the plan, with optional auto-approval, but the core effect is enacting changes and updating state.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy