TA-002-P · Question #98
TA-002-P Question #98: Real Exam Question with Answer & Explanation
The correct answer is B: When a change is made to the resources via the Azure Cloud Console, Terraform will. Terraform state is not automatically updated by changes made in the Azure Cloud Console; Terraform detects this drift only during the next plan or apply operation.
Question
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)
Options
- AWhen a change is made to the resources via the Azure Cloud Console, the changes are
- BWhen a change is made to the resources via the Azure Cloud Console, Terraform will
- CWhen a change is made to the resources via the Azure Cloud Console, the current state
- DWhen a change is made to the resources via the Azure Cloud Console, the changes are
Explanation
Terraform state is not automatically updated by changes made in the Azure Cloud Console; Terraform detects this drift only during the next plan or apply operation.
Common mistakes.
- A. Changes made in the Azure Cloud Console are not automatically reflected in the Terraform state file; the state file only updates when Terraform explicitly runs a refresh or apply operation.
- C. The current state file is not automatically synchronized with out-of-band changes; it remains stale until Terraform actively queries the provider APIs.
- D. Out-of-band changes in the Azure Cloud Console are not automatically reconciled into the Terraform state; a 'terraform refresh' or 'terraform apply' is required to detect and record them.
Concept tested. Terraform state drift detection with Azure resources
Reference. https://developer.hashicorp.com/terraform/language/state
Topics
Community Discussion
No community discussion yet for this question.