nerdexam
HashiCorp

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.

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

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)
  • A
    3% (1)
  • B
    91% (30)
  • C
    6% (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.

AWorkspaces allow you to manage collections of infrastructure in state files.

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.

BA logical separation of business unitsCorrect

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.

CA method of grouping multiple infrastructure security policies

Workspaces are not directly used for grouping security policies; security policies are typically managed by the cloud provider or through other Terraform configurations.

DProvides limited access to a cloud environment

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

#Terraform Workspaces#State Management#Environment Isolation#CLI Command

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice