-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backend configuration should support workspaces #23874
Comments
Hi @matti, You mention "bucket" in the issue here, is this a specific request for the s3 backend? The |
I think that the following workaround would work:
this would keep |
Thanks @matti I think this is confusion abut what workspaces are in the CLI, and why I mentioned that we have plans to rethink this to better align them with "workspaces" in Terraform Cloud which are different. In the CLI, workspaces are simply a named state file, and switching workspaces only changes which name the state goes by within the current backend. Because they only exist within the backend itself, you need to start with the same |
Confusion or not, I'm now sucessfully running This allows concurrent running of different workspaces at the same time from my machine. |
so technically I'm not using multiple workspaces at the same time - I only use them to get handy |
currently it's not possible to have backend per workspace.
for example workspace "bar" to have bucket "terraform-bar" and "beer" to have bucket "terraform-beer"
both workspaces live in the same bucket, effectively granting user access to all workspaces.
this is due to
.terraform/terraform.tfstate
not supporting workspaces.proposed solution: use
.terraform/<workspacename>.tfstate
when workspace configured.The text was updated successfully, but these errors were encountered: