TERRAFORM-ASSOCIATE-004 · Question #61
Where does the Terraform local backend store its state?
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
Options
- AIn the terraform file
- BIn the /tmp directory
- CIn the terraform,tfstate file
- DIn the user's terraform,state file
How the community answered
(26 responses)- B4% (1)
- C92% (24)
- D4% (1)
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.