-
Notifications
You must be signed in to change notification settings - Fork 543
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 to set default issuers configuration for PKI Secrets Engine #1937
Conversation
var pkiSecretBackendFromConfigIssuersPathRegex = regexp.MustCompile("^(.+)/config/issuers") | ||
|
||
const ( | ||
fieldDefaultFollowsLatestIssuer = "default_follows_latest_issuer" |
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 thought this might be a good spot for an example to showcase that if a schema field seems very specific to only a single resource, we need not export it out of the package and needlessly bulk up our consts
package. Instead, we can define an unexported constant within the same file. However, if this feels a bit unclean, I'm happy to move it to the constants package
leading or trailing `/`s. | ||
|
||
* `default` - (Required) Specifies the default issuer using the issuer ID. | ||
**NOTE:** It is recommended to only set the default issuer using the ID. |
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.
In Vault, one can provide both the issuer name and issuer ID to set this field. However, since the Vault response only ever returns the issuer ID for this field, there can be a drift in the TF state if we provide an issuer name but Vault returns an issuer ID. I opted to document for now that we recommend only using the ID (since that is fairly easy to do in TF), but in the future if users feel like they specifically want to be able to set this parameter by the issuer name we can always add an additional read-only schema field that will store the ID separately (thereby removing any drifts)
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.
Nice! thanks for the context!
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.
Looks good! Let me know if my question doesn't apply in this context.
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.
LGTM! Just a few suggestions
Co-authored-by: John-Michael Faircloth <fairclothjm@users.noreply.github.com>
Adds a new resource with relevant tests and documentation that allows users to set the default issuer under a mount.