TA-002-P · Question #364
What is the purpose of a Terraform workspace in either open source of enterprise?
The correct answer is B. A logical separation of business units. Terraform workspaces provide a mechanism for deploying multiple, isolated instances of the same infrastructure configuration, often used for logical separation of environments or business units.
Question
What is the purpose of a Terraform workspace in either open source of enterprise?
Options
- AWorkspaces allow you to manage collections of infrastructure in state files.
- BA logical separation of business units
- CA method of grouping multiple infrastructure security policies
- DProvides limited access to a cloud environment
How the community answered
(33 responses)- A3% (1)
- B91% (30)
- C6% (2)
Why each option
Terraform workspaces provide a mechanism for deploying multiple, isolated instances of the same infrastructure configuration, often used for logical separation of environments or business units.
While workspaces do manage collections of infrastructure in separate state files, this is a mechanism to achieve logical separation rather than the ultimate purpose itself.
Terraform workspaces, particularly in Terraform Cloud/Enterprise, are used for the logical separation of infrastructure deployments, such as different environments (development, staging, production) or distinct projects for different business units. While they achieve this by isolating state files, their primary purpose extends to organizing and managing these separate deployments as distinct entities within an organization.
Workspaces are not directly used for grouping security policies; security policies are typically managed by the cloud provider or through other Terraform configurations.
Workspaces do not inherently provide limited access to a cloud environment; access control is managed by IAM policies or similar mechanisms in the cloud provider.
Concept tested: Purpose of Terraform workspaces
Source: https://developer.hashicorp.com/terraform/cli/commands/workspace
Topics
Community Discussion
No community discussion yet for this question.