HashiCorp Certified: Terraform Associate — Question 222
Where does the Terraform local backend store its state?
Answer options
- A. In the terraform.tfstate file
- B. In the .terraform directory
- C. In the terraform.tfstate directory
- D. In the .terraform.lock.hcl file
Correct answer: A
Explanation
The correct answer is A, as the Terraform local backend stores its state in the terraform.tfstate file by default. Options B and C refer to directories that may contain configuration and other files, but do not specifically hold the state. Option D refers to a lock file that is used for dependency management, not for storing state.