TA-002-P · Question #42
Where does the Terraform local backend store its state?
The correct answer is C. In the terraform.tfstate file. The Terraform local backend (the default when no backend block is configured) stores state in a file named 'terraform.tfstate' in the current working directory. The '.tfvars' file is for variable values, '.terraformrc' is for CLI configuration, and '/tmp' is not where Terraform…
Question
Where does the Terraform local backend store its state?
Options
- AIn the /tmp directory
- BIn the terraform.tfvars file
- CIn the terraform.tfstate file
- DIn the user's .terraformrc file
How the community answered
(32 responses)- A6% (2)
- B3% (1)
- C88% (28)
- D3% (1)
Explanation
The Terraform local backend (the default when no backend block is configured) stores state in a file named 'terraform.tfstate' in the current working directory. The '.tfvars' file is for variable values, '.terraformrc' is for CLI configuration, and '/tmp' is not where Terraform writes state. Option C is correct.
Topics
Community Discussion
No community discussion yet for this question.