-
Notifications
You must be signed in to change notification settings - Fork 580
[New Data Source]: vault_kv_secret_v2_metadata
#2539
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
base: main
Are you sure you want to change the base?
Conversation
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
There is a corporate Contributor License Agreement between GitLab and HashiCorp, dated 2021. I have contacted our legal team to be added to the list of contributors. |
vault_kv_secret_metadata
vault_kv_secret_v2_metadata
✅ Our legal team has informed me that I have been added to a list of authorized contributors. The CLA bot is happy now. |
…the `Read()` functions.
…secret metadata. This is primarily useful for accessing a secret's version in a non-ephemeral way, without also loading the secret itself. The non-ephemeral version can then be used as a write-only version argument, controlling upgrade behavior without storing the secret in the state. Issue: hashicorp#2537
ea7250c
to
7e8e9b8
Compare
Removed the ChangeLog entry which caused merge conflicts and rebased onto @lursu This PR is ready for review. If you need anything from me to proceed with the review, please let me know. |
Description
This PR adds a new data source
vault_kv_secret_v2_metadata
that allows retrieving metadata from a KV-V2 secret without exposing the secret content itself.The primary use case is to obtain non-ephemeral version information that can be used with write-only version arguments in downstream resources, solving a common issue when working with ephemeral secrets. This enables proper change tracking for Vault secrets while maintaining security by keeping the actual secret content ephemeral.
The new data source complements the existing
vault_kv_secret_v2
ephemeral data source by providing just the metadata (particularly the version number) without storing sensitive data in the Terraform state.Closes #2537
Checklist
Output from acceptance testing:
Community Note
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.