TA-002-P · Question #211
You have created two workspaces PROD and DEV. You have switched to DEV and provisioned DEV infrastructure from this workspace. Where is your state file stored?
The correct answer is D. terraform.tfstate.d. Terraform stores the workspace states in a directory called terraform.tfstate.d. This directory should be treated similarly to default workspace state file terraform.tfstate main.tf terraform.tfstate.d terraform.tfstate # DEV workspace state file terraform.tfstate # PROD…
Question
You have created two workspaces PROD and DEV. You have switched to DEV and provisioned DEV infrastructure from this workspace. Where is your state file stored?
Options
- Aterraform.d
- Bterraform.tfstate
- Cterraform.tfstate.DEV
- Dterraform.tfstate.d
How the community answered
(30 responses)- B3% (1)
- C3% (1)
- D93% (28)
Explanation
Terraform stores the workspace states in a directory called terraform.tfstate.d. This directory should be treated similarly to default workspace state file terraform.tfstate main.tf terraform.tfstate.d terraform.tfstate # DEV workspace state file terraform.tfstate # PROD workspace state file terraform.tfvars # Default workspace state file
Topics
Community Discussion
No community discussion yet for this question.