-
Notifications
You must be signed in to change notification settings - Fork 558
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 disabled_validations to the PKI CMPv2 config resource #2412
base: main
Are you sure you want to change the base?
Conversation
2bc5562
to
efa5c94
Compare
efa5c94
to
268438e
Compare
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 - I'd love another set of eyes since I haven't added one of these fields before (and I don't know, eg. how CHANGELOG works). Added a couple confused comments.
@@ -63,6 +63,15 @@ func pkiSecretBackendConfigCMPV2DataSource() *schema.Resource { | |||
Type: schema.TypeString, | |||
}, | |||
}, | |||
consts.FieldDisabledValidations: { |
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.
Every other field seems to have a "computed" line - why not this one? How is this different than AuditFields in that sense? I'm also not really sure how optional works here? Most of these don't have that listed.
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.
The computed argument is mainly used when a value is returned from the server when no initial value from Terraform itself was provided. In this case since I believe the value returned will be an empty list it isn't required.
Optional only means the field does not need to be specified within the resource block
* `audit_fields` - (Optional) Fields parsed from the CSR that appear in the audit and can be used by sentinel policies. | ||
|
||
* `disabled_validations` - (Optional) A comma-separated list of validations not to perform on CMPv2 messages. |
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.
Might be nice to mention what the (current) supported options are.
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 believe the norm isn't to specify a list here as it can fall out of sync with the server side of things, especially across revisions.
Its the same reasoning the TFVP team have shied away from enforcing the valid values on the input schema as it causes end-user friction that we need to update and publish a new TFVP version every time something on the server changes
Description
Add support for disabled_validations to the PKI CMPv2 config resource.
Checklist
Output from acceptance testing:
Community Note