Which statement about Terraform state management in Azure deployments is accurate?

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 state management in Azure deployments is accurate?

Explanation:
Terraform state is a snapshot of what Terraform believes the real Azure environment looks like, stored in a state file either locally or in a remote backend. Changes you make directly in the Azure Portal bypass Terraform, so they don’t automatically update that state file. To bring Terraform’s view in line with what actually exists in Azure, you must refresh the state by running a plan (which performs a refresh) or explicitly run refresh/apply. Only after refreshing does the state reflect any portal changes, and then Terraform can plan or apply accordingly. The state file isn’t deleted after each plan, and portal edits won’t automatically modify the state without that refresh step. That’s why the statement that changes via the portal do not update the current state file is accurate.

Terraform state is a snapshot of what Terraform believes the real Azure environment looks like, stored in a state file either locally or in a remote backend. Changes you make directly in the Azure Portal bypass Terraform, so they don’t automatically update that state file. To bring Terraform’s view in line with what actually exists in Azure, you must refresh the state by running a plan (which performs a refresh) or explicitly run refresh/apply. Only after refreshing does the state reflect any portal changes, and then Terraform can plan or apply accordingly. The state file isn’t deleted after each plan, and portal edits won’t automatically modify the state without that refresh step. That’s why the statement that changes via the portal do not update the current state file is accurate.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy