Support separate backend configurations for each workspace
### Terraform Version Terraform v0.10.8 ### Terraform Configuration Files ```hcl terraform { backend "s3" {} } ``` ### Debug Output N/A ### Crash Output N/A ### Expected Behavior I should be able to run any terraform command with `TF_WORKSPACE=...` to separate the operations between different states, as originally requested in #14447, and implemented for the new workspaces terminology in #14952. I would expect that, therefore, in order for this to work terraform would need to configure the backends for each workspace separately, so that multiple states can be manipulated in parallel. Switching workspaces should not cause any messages about the backend being reconfigured. ### Actual Behavior `terraform init` does not care about workspace; it always tries to reconfigure the _current_ backend when I switch to a new workspace and then initialize that one for a new state. ### Steps to Reproduce Please list the full steps required to reproduce the issue, for example: 1. `TF_WORKSPACE=foo terraform init -backend-config=bucket=mybucket -backend-config=region=us-east-1 -backend-config=key=foo.tfstate` 2. `TF_WORKSPACE=bar terraform init -backend-config=bucket=mybucket -backend-config=region=us-east-1 -backend-config=key=bar.tfstate` Terraform will say the backend configuration has changed and will ask to copy state from s3. ### Important Factoids Our team uses one tfstate per AWS region per environment. So for instance our qa environment has state files for us-west-2, us-eas
Posted by 2rs2ts on Nov 11, 2017, 12:28 AM
Tags
Related issues
- Huh, this is not my experience.
- For some reason an Azure outage does not faze me in the same way that an AWS outage does.
- The triplet of wind, pole, dragon appears multiple times in the same order, so is possibly a single phrase that has been broken up into t...
- Option to skip refreshing resource instances whose configuration hasn't changed since the last apply
- [YouTube] Unable to extract uploader id
- Add ability to prioritize GitHub Action runners
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
reliability (E-commerce)
Huh, this is not my experience.
For some reason an Azure outage does not faze me in the same way that an AWS outage does.
The triplet of wind, pole, dragon appears multiple times in the same order, so is possibly a single phrase that has been broken up into t...
Option to skip refreshing resource instances whose configuration hasn't changed since the last apply
[YouTube] Unable to extract uploader id
Add ability to prioritize GitHub Action runners
Microsoft Flight Simulator (2020) (1250410)
Codegen collaboration with Apollo Codegen and GraphQL Code Generator
Support separate backend configurations for each workspace
### Terraform Version Terraform v0.10.8 ### Terraform Configuration Files ```hcl terraform { backend "s3" {} } ``` ### Debug Output N/A ### Crash Output N/A ### Expected Behavior I should be able to run any terraform command with `TF_WORKSPACE=...` to separate the operations between different states, as originally requested in #14447, and implemented for the new workspaces terminology in #14952. I would expect that, therefore, in order for this to work terraform would need to configure the backends for each workspace separately, so that multiple states can be manipulated in parallel. Switching workspaces should not cause any messages about the backend being reconfigured. ### Actual Behavior `terraform init` does not care about workspace; it always tries to reconfigure the _current_ backend when I switch to a new workspace and then initialize that one for a new state. ### Steps to Reproduce Please list the full steps required to reproduce the issue, for example: 1. `TF_WORKSPACE=foo terraform init -backend-config=bucket=mybucket -backend-config=region=us-east-1 -backend-config=key=foo.tfstate` 2. `TF_WORKSPACE=bar terraform init -backend-config=bucket=mybucket -backend-config=region=us-east-1 -backend-config=key=bar.tfstate` Terraform will say the backend configuration has changed and will ask to copy state from s3. ### Important Factoids Our team uses one tfstate per AWS region per environment. So for instance our qa environment has state files for us-west-2, us-eas
Comments (0)
No comments yet. Start the discussion.