-
Notifications
You must be signed in to change notification settings - Fork 136
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 patch_metadata method to kv api #277
Conversation
lib/vault/api/kv.rb
Outdated
# be a {Hash}. | ||
# | ||
# @example | ||
# Vault.kv("secret").patch_metadata("password", custom_metadata: { data: update }, max_versions => 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Vault.kv("secret").patch_metadata("password", custom_metadata: { data: update }, max_versions => 3) | |
# Vault.kv("secret").patch_metadata("password", custom_metadata: { my_custom_key: "my_value" }, max_versions: 3) |
two suggestions:
- removing
data
as the key (data
can get confusing w/ kv-v2 engine) - replaced
=>
with:
(didn't work with the=>
as written)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhuckins Adjusted. The max_versions
issue is in a bunch of the other examples in that file, so will probably want to fix those if they have the same issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! do you mind rebasing/pulling upstream branch so the refactored CI can run? (on your branch: git pull master
should do the trick)
sorry for the delay
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhuckins no worries. should be caught up now
This PR adds a
patch_metadata
method to the kv api, as described in https://developer.hashicorp.com/vault/api-docs/secret/kv/kv-v2#patch-metadata. The driver for this was to be able to updatecustom_metadata
viapatch
rather than re-writing the entire existingcustom_metadata
hash.