-
Notifications
You must be signed in to change notification settings - Fork 13
listresourcevalidator: add new package with common validators for list resource configurations #298
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
Conversation
| func (v AtLeastOneOfValidator) ValidateEphemeralResource(ctx context.Context, req ephemeral.ValidateConfigRequest, resp *ephemeral.ValidateConfigResponse) { | ||
| resp.Diagnostics = v.Validate(ctx, req.Config) | ||
| } | ||
|
|
||
| func (v AtLeastOneOfValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse) { | ||
| func (v AtLeastOneOfValidator) ValidateListResourceConfig(ctx context.Context, req list.ValidateConfigRequest, resp *list.ValidateConfigResponse) { | ||
| resp.Diagnostics = v.Validate(ctx, req.Config) | ||
| } | ||
|
|
||
| func (v AtLeastOneOfValidator) ValidateEphemeralResource(ctx context.Context, req ephemeral.ValidateConfigRequest, resp *ephemeral.ValidateConfigResponse) { | ||
| func (v AtLeastOneOfValidator) ValidateProvider(ctx context.Context, req provider.ValidateConfigRequest, resp *provider.ValidateConfigResponse) { | ||
| resp.Diagnostics = v.Validate(ctx, req.Config) | ||
| } | ||
|
|
||
| func (v AtLeastOneOfValidator) ValidateResource(ctx context.Context, req resource.ValidateConfigRequest, resp *resource.ValidateConfigResponse) { |
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.
Performed some alphabetical reordering in several files similar to this..
rainkwan
left a comment
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.
Everything seems reasonable to me, I also feel the urge to reorder for alphabetical order sometimes.
Related Issue
Dependent on hashicorp/terraform-plugin-framework#1178
Description
Adds validators for List Resource Configs.
Rollback Plan
Changes to Security Controls
None.