nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #117

You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend…

The correct answer is D. Terraform workspaces. Terraform workspaces allow you to create multiple states but still be associated with your current code. Workspaces are like "environments" (e.g. staging, production) for the same configuration. You can use workspaces to spin up a copy of your production deployment for testing…

Submitted by yaw92· Apr 18, 2026Manage Terraform State

Question

You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend, what open source Terraform feature would allow you create multiple states but still be associated with your current code?

Options

  • ATerraform data sources
  • BTerraform local values
  • CTerraform modules
  • DTerraform workspaces
  • ENone of the above

How the community answered

(52 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    4% (2)
  • D
    92% (48)

Explanation

Terraform workspaces allow you to create multiple states but still be associated with your current code. Workspaces are like "environments" (e.g. staging, production) for the same configuration. You can use workspaces to spin up a copy of your production deployment for testing purposes without having to configure a new state backend. Terraform data sources, local values, and modules are not features that allow you to create multiple states.

Topics

#Terraform Workspaces#State Management#Environments

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice