HashiCorp Certified: Terraform Associate — Question 112
What is a key benefit of the Terraform state file?
Answer options
- A. A state file can be used to schedule recurring infrastructure tasks
- B. A state file represents a source of truth for resources provisioned with a public cloud console
- C. A state file represents the desired state expressed by the Terraform code files
- D. A state file represents a source of truth for resources provisioned with Terraform
Correct answer: D
Explanation
The correct answer is D because the Terraform state file acts as a reliable reference point for the resources that Terraform manages. Option A is incorrect as the state file does not handle scheduling tasks. Option B is not accurate since the state file specifically pertains to resources provisioned by Terraform, rather than a public cloud console. Option C is misleading because it refers to the desired state in the code, but the state file itself is about the actual state of resources.