hashicorp / terraform-provider-vault

Terraform Vault provider
https://www.terraform.io/docs/providers/vault/
Mozilla Public License 2.0
451 stars 535 forks source link

[Enhancement]: Provide a hashed value of data.vault_generic_secret.secret.data #2229

Open hguermeur opened 2 months ago

hguermeur commented 2 months ago

Description

We could have an attribute that allows us to obtain a Vault generic_secret in the form of a hashed version (bcrypt or other), as random_password does. There are many cases where we do not need to use the password itself.

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

Potential Terraform Configuration

data "vault_generic_secret" "secrets" {
  path = "secrets/secrets"
}

resource app myapp {
 input_var = data.vault_generic_secret.secrets.data["mysecret"].bcrypt_hash
}

References

No response

Would you like to implement a fix?

None