-
Notifications
You must be signed in to change notification settings - Fork 540
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 support for a KV V2 Secret Metadata resource #1687
Conversation
@vinay-gopalan Seems like this is the same as #1239 |
@joao-oneill-unbabel the two are definitely similar! Though the code in this PR slightly differs from the one you mentioned, in that this resource is compatible with the latest dedicated KV V2 Secret engine support that was added to the TFVP in v3.7.0 as opposed to the legacy resource |
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.
Looking good. Have some initial feedback for you.
vault/resource_kv_secret_v2.go
Outdated
consts.FieldData: { | ||
Type: schema.TypeMap, | ||
Optional: true, | ||
Computed: true, |
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.
Should this ever be a computed value? Presumably the default is empty.
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.
I wanted to make sure we are able to import the custom metadata and set it to the TF state for the KV secret, specifically in the cases that the secret metadata was created outside of TF and via Vault. That was my thought process around setting this field to also be possibly computed. Is that overkill/unnecessary?
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.
I removed the Computed
from the individual nested fields, but still set Computed: true
for the parent custom_metadata
field
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.
A few minor nits to address, then 👍
1 acceptance test suite is failing due to GH request rate limiting; proceeding to merge since the work done here does not affect the failing tests |
Adds support for adding custom metadata to a KV V2 secret resource.
Output from acceptance testing: