TERRAFORM-ASSOCIATE-004 · Question #61
TERRAFORM-ASSOCIATE-004 Question #61: Real Exam Question with Answer & Explanation
The correct answer is C: In the terraform,tfstate file. Terraform's local backend stores state in a file named terraform.tfstate in the current working directory where Terraform commands are run. This is the default behavior when no backend is explicitly configured. The state file is a JSON document that tracks the mapping between you
Question
Where does the Terraform local backend store its state?
Options
- AIn the terraform file
- BIn the /tmp directory
- CIn the terraform,tfstate file
- DIn the user's terraform,state file
Explanation
Terraform's local backend stores state in a file named terraform.tfstate in the current working directory where Terraform commands are run. This is the default behavior when no backend is explicitly configured. The state file is a JSON document that tracks the mapping between your configuration and the real-world infrastructure. For team environments, a remote backend (e.g., Terraform Cloud, S3) is recommended to enable state locking and sharing.
Topics
Community Discussion
No community discussion yet for this question.