New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Terraform-Associate-004 Exam - Topic 8 Question 1 Discussion

Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 1
Topic #: 8
[All Terraform-Associate-004 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: D

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.Reference=WorkspacesandHow to Use Terraform Workspaces


Contribute your Thoughts:

0/2000 characters
Lenna
7 days ago
I'm not entirely sure, but I feel like modules are more about organizing code rather than managing state.
upvoted 0 times
...
Lezlie
12 days ago
I think this question is about managing different environments in Terraform. I remember something about workspaces being useful for that.
upvoted 0 times
...
Krissy
18 days ago
I feel pretty confident that Terraform workspaces is the right answer here. That's the feature I've used in the past to manage multiple environments without having to set up a new backend each time.
upvoted 0 times
...
Edison
23 days ago
Workspaces sound like they could work, but I'm a little worried about the potential complexity. I might want to look into the other options as well, just to make sure I'm not missing something simpler.
upvoted 0 times
...
Wai
28 days ago
Okay, let me see. I'm pretty sure data sources and local values wouldn't be the right solution for this. And modules are more for organizing code, not managing state. So I'm leaning towards Terraform workspaces as the best option.
upvoted 0 times
...
Christiane
1 month ago
Hmm, I'm not totally sure about this one. I know Terraform has some features for managing multiple states, but I'm not familiar with the specifics. I'll have to think this through carefully.
upvoted 0 times
...
Tommy
1 month ago
I think Terraform workspaces might be the way to go here. That would let me create multiple states without having to set up a whole new backend configuration.
upvoted 0 times
...

Save Cancel