TA-002-P · Question #394
Do terraform workspaces help in adding/allowing multiple state files for a single configuration?
The correct answer is A. True. Terraform workspaces do allow multiple state files for a single configuration, with each workspace maintaining its own independent state file.
Question
Do terraform workspaces help in adding/allowing multiple state files for a single configuration?
Options
- ATrue
- BFalse
How the community answered
(35 responses)- A89% (31)
- B11% (4)
Why each option
Terraform workspaces do allow multiple state files for a single configuration, with each workspace maintaining its own independent state file.
Terraform workspaces enable teams to manage multiple distinct state files from a single configuration directory, allowing the same infrastructure code to be applied to different environments such as dev, staging, and production without conflict. Each workspace stores its state separately, confirming that workspaces support multiple state files per configuration.
False is incorrect because the Terraform workspace feature is explicitly designed to maintain separate state files for the same configuration, which is its primary purpose and a documented capability.
Concept tested: Terraform workspaces and multiple state file management
Source: https://developer.hashicorp.com/terraform/cli/workspaces
Topics
Community Discussion
No community discussion yet for this question.