nerdexam
HashiCorp

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.

Implement and maintain state

Question

Do terraform workspaces help in adding/allowing multiple state files for a single configuration?

Options

  • ATrue
  • BFalse

How the community answered

(35 responses)
  • A
    89% (31)
  • B
    11% (4)

Why each option

Terraform workspaces do allow multiple state files for a single configuration, with each workspace maintaining its own independent state file.

ATrueCorrect

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.

BFalse

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

#Terraform Workspaces#Terraform State#Multiple States#State Management

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice