TA-002-P · Question #119
What allows you to conveniently switch between multiple instances of a single configuration within its single backend?
The correct answer is D. Workspaces. Workspaces allow you to manage multiple distinct state files for the same configuration within a single backend. For example, you can have dev, staging, and prod workspaces that all use the same Terraform code but maintain separate state. You switch between them using terraform…
Question
What allows you to conveniently switch between multiple instances of a single configuration within its single backend?
Options
- ALocal backends
- BProviders
- CRemote backends
- DWorkspaces
How the community answered
(16 responses)- A6% (1)
- D94% (15)
Explanation
Workspaces allow you to manage multiple distinct state files for the same configuration within a single backend. For example, you can have dev, staging, and prod workspaces that all use the same Terraform code but maintain separate state. You switch between them using terraform workspace select <name>. Local backends (A) refer to where state is stored locally, not isolation between instances. Providers (B) are plugins for API interaction. Remote backends (C) are a storage mechanism for state, not an isolation/switching mechanism by themselves.
Topics
Community Discussion
No community discussion yet for this question.