Skip to content
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 "workspace_key_suffix" support so we can get rid of forced "env:workspace" on key in state #36173

Open
1 task done
stan-spotts opened this issue Dec 6, 2024 · 1 comment

Comments

@stan-spotts
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

The S3 provider has workspace_key_prefix. and it would be create if azurerm had something similar as well. When using workspaces, I set the container name to include the environment name, and all the keys within the container are related to that environment.

It's annoying to have terraform init create a key, then terraform apply create another one with env:workspace appended to it. Especially when I have multiple scripts set up for different resource types. So being able to stop the behavior of appending the env:workspace to the end of the key would be great.

New or Affected Resource(s)/Data Source(s)

azurerm

Potential Terraform Configuration

terraform {
  backend "azurerm" {
    resource_group_name  = "terraform-state-rg"
    storage_account_name = "tfstate"
    container_name       = "prod-tfstate"
    key                  = "vnet.tfstate"
    workspace_key_suffix = ""
  }
}

References

No response

@rcskosir
Copy link

rcskosir commented Dec 7, 2024

Thanks for taking the time to open this issue. Issues related to the Azure backend live in the hashicorp/terraform repo, so I am going to move this issue there.

@rcskosir rcskosir transferred this issue from hashicorp/terraform-provider-azurerm Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants