Skip to content

Conversation

stephybun
Copy link
Member

Related Issue

Dependent on hashicorp/terraform-plugin-framework#1178

Description

Adds validators for List Resource Configs.

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

None.

@stephybun stephybun requested a review from a team as a code owner July 21, 2025 08:40
Comment on lines +42 to +54
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) {
Copy link
Member Author

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..

@stephybun stephybun changed the title listresourcevalidator: add new package with common validators for list resource configurationws listresourcevalidator: add new package with common validators for list resource configurations Jul 21, 2025
Copy link

@rainkwan rainkwan left a 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.

@stephybun stephybun merged commit fd9f0f4 into main Jul 24, 2025
5 checks passed
@stephybun stephybun deleted the f/list-resource-validators branch July 24, 2025 07:10
@austinvalle austinvalle added this to the v0.19.0 milestone Aug 15, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants