HashiCorp Certified: Terraform Associate — Question 141
What does Terraform not reference when running a terraform apply -refresh-only?
Answer options
- A. Credentials
- B. State file
- C. Terraform resource definitions in configuration files
- D. Cloud provider
Correct answer: C
Explanation
The correct answer is C because during a terraform apply -refresh-only, Terraform updates the state file based on the real-world resources without altering the configuration files. Options A, B, and D are still referenced as Terraform needs credentials to access the cloud provider and relies on the state file to track existing resources.