-
Notifications
You must be signed in to change notification settings - Fork 548
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
"patch" a kv2? #1005
Comments
hi @tony-kerz - I had the same scenario. What I have as a workaround for this is I use the data source for "vault_generic_secret" to get the current data value then merge with the KV pair I want to add/patch. Hope the code snippet below helps:
|
@MAN98 yes, i tried the same thing, and it works ok, but an issue that i forgot to mention is that like
what would be awesome would be building something like the above into the provider which could be activated with an "upsert" option flag 😎 |
I have the same issue, I had to create a |
Are there any news about this? |
i needed to create kvv2 secrets in bulk through terraform without creating new versions everytime terraform gets invoked and it's interesting to have a resource like this: what is the point of terraform state if it generates a new version of the secret everytime we run seems like kvv2 can't be automated through terraform directly (for people who use atlantis to apply terraform) |
Terraform Version
0.14.7
Affected Resource(s)
vault_generic_secret
vault_generic_endpoint
Terraform Configuration Files
i have two situations where i'm looking for kv2-patch behavior,
to avoid clobbering some portion of a secret:
(a) two different areas of code are both wanting to write to the same path
(b) a human and some code are both wanting to write to the same path
i've tried both vault-generic-secret and vault-generic-endpoint and they both seem to be clobbering whatever was there,
is there some magic either of these behave like patch?
Expected Behavior
would love to see patch behavior
Actual Behavior
every write overwrites previous values
Steps to Reproduce
hand write something in vault, try to patch it using either of the two resources mentioned above
Important Factoids
kv2 in play
The text was updated successfully, but these errors were encountered: