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

Add postgres backend and customize key (default workspace can it be changed ) #35910

Open
swtbahmed opened this issue Oct 28, 2024 · 4 comments

Comments

@swtbahmed
Copy link

swtbahmed commented Oct 28, 2024

Terraform Version

terraform {
  required_providers {
    vsphere = {
      source  = "hashicorp/vsphere"
      version = "2.9.1"
    }
    vault = {
      source  = "hashicorp/vault"
      version = "4.4.0"
    }
  }
}

Affected Pages

No response

What is the docs issue?

am using terraform backend "pg"
it is by default keyed by workspaces .. is it possible to change that key to be dynamic not by workspaces that need to exist in advance..
i don't want to use workspaces

Proposal

the proposed is to change the default key from workspace ==> to key= dynamic value generated from terraform code using variables
is that possible

References

No response

@swtbahmed swtbahmed added documentation new new issue not yet triaged labels Oct 28, 2024
@bschaatsbergen bschaatsbergen added backend/pg and removed new new issue not yet triaged labels Oct 28, 2024
@bschaatsbergen
Copy link
Member

Hey @swtbahmed, thank you for raising this issue! I’m tagging @remilapeyre for visibility since they manage the Postgres backend. In the meantime, I find this backend quite interesting, so I’ll also do some research on it.

@swtbahmed
Copy link
Author

@bschaatsbergen Thank you for the response i'll be waiting for @remilapeyre.
So i can explain more my issue. Thank you

@bschaatsbergen
Copy link
Member

bschaatsbergen commented Oct 28, 2024

Please feel free to share your thoughts or challenges already. Doing so not only helps me consider potential solutions but also contributes to a public record that others can engage with as well.

@swtbahmed
Copy link
Author

hello i can explain more the use case am facing :
Am working on creating multiple VMs and the goal is to save each tfsate file in a Column in pg database but what a find in docs that is keyed by default with workspace so i need to create a workspace for each vm i see it's not practical..
And i need to work on postgres any suggestion and i will be gratefull

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

2 participants