You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each.
Which command would you use?
You would like to reuse the same Terraform configuration for your development and production environments with a different state file for each.
Which command would you use?
To reuse the same Terraform configuration for both development and production environments while using different state files, you should use the 'terraform workspace' command. This command allows you to create and switch between multiple workspaces, each with its own state file, enabling you to manage different environments effectively.
Workspace is the right answer
workspace = different state file
B is correct answer : Workspaces. https://www.terraform.io/language/state/workspaces#when-to-use-multiple-workspaces
terraform workspace new dev (or prod) , terraform apply -var-file dev.tfvars so terraform workspace is the answer
https://developer.hashicorp.com/terraform/language/state/workspaces#when-to-use-multiple-workspaces
BBBBBBBBBB