HashiCorp Terraform Associate Practice Exam

Access More Questions
When you modify a resource in Azure Portal that is managed by Terraform, when does Terraform reflect that change in its state?
Correct Answer:
During the next plan or apply
Explanation:
Terraform tracks resources in a state file and only learns about outside changes when it refreshes that state. If you tweak a resource in Azure Portal, Terraform’s view becomes out of sync. When you run the next plan (or apply), Terraform refreshes its state by querying Azure for the current attributes of the resource. This refresh updates the in-memory state to reflect the real-world resource, and the plan will show any drift. When you then apply, the state file itself is updated to match the actual resource, bringing everything back into alignment. So the change is reflected the next time you run plan or apply.

Access more questions from this quiz

Continue to HashiCorp Terraform Associate Practice Exam for more practice questions and the full quiz experience.

Access More Questions