HashiCorp Certified: Terraform Associate (003) — Question 12
When using Terraform to deploy resources into Azure, which scenarios are true regarding state files?
Answer options
- A. Changing resources via the Azure Cloud Console records the change in the current state file.
- B. When you change a resource via the Azure Cloud Console. Terraform records the changes in a new state file.
- C. When you change a Terraform-managed resource via the Azure Cloud Console. Terraform updates the state file to reflect the change during the next plan or apply.
- D. Changing resources via the Azure Cloud Console does not update current state file.
Correct answer: D
Explanation
The correct answer is D because changes made directly in the Azure Cloud Console are not captured by Terraform, thus leaving the state file unchanged. Options A, B, and C are incorrect as they imply that Terraform tracks changes made outside of its management, which it does not do until it is explicitly informed through a plan or apply command.