nerdexam
HashiCorp

TA-002-P · Question #303

True or False? Each Terraform workspace uses its own state file to manage the infrastructure associated with that particular workspace.

The correct answer is B. True. This is True. Terraform workspaces are a mechanism for managing multiple distinct state files within a single configuration directory. Each workspace (e.g., default, dev, prod) maintains its own isolated state file, meaning infrastructure changes in one workspace do not affect…

Implement and maintain state

Question

True or False? Each Terraform workspace uses its own state file to manage the infrastructure associated with that particular workspace.

Options

  • AFalse
  • BTrue

How the community answered

(49 responses)
  • A
    10% (5)
  • B
    90% (44)

Explanation

This is True. Terraform workspaces are a mechanism for managing multiple distinct state files within a single configuration directory. Each workspace (e.g., default, dev, prod) maintains its own isolated state file, meaning infrastructure changes in one workspace do not affect another. For local backends, state files are stored under a terraform.tfstate.d/<workspace-name>/ directory structure. This isolation is the primary purpose of workspaces - allowing the same configuration to manage separate, independent infrastructure deployments.

Topics

#Terraform workspaces#Terraform state#State files#Infrastructure management

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice