HashiCorp Certified: Terraform Associate — Question 151

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?

Answer options

Correct answer: D

Explanation

The correct answer is D, Terraform workspaces, as they allow multiple state instances to coexist while using the same configuration. The other options, such as data sources, local values, and modules, do not offer this functionality of managing separate states in conjunction with the same codebase.