Skip to content
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

NoNullValues validator for list and set types #245

Open
1 task done
jar-b opened this issue Nov 11, 2024 · 0 comments · May be fixed by #246
Open
1 task done

NoNullValues validator for list and set types #245

jar-b opened this issue Nov 11, 2024 · 0 comments · May be fixed by #246
Labels
enhancement New feature or request

Comments

@jar-b
Copy link
Member

jar-b commented Nov 11, 2024

Terraform CLI and Framework Versions

% terraform version
Terraform v1.9.5
on darwin_arm64
% cat go.mod | rg terraform-plugin-framework
        github.com/hashicorp/terraform-plugin-framework v1.13.0
        github.com/hashicorp/terraform-plugin-framework-jsontypes v0.2.0
        github.com/hashicorp/terraform-plugin-framework-timeouts v0.4.1
        github.com/hashicorp/terraform-plugin-framework-timetypes v0.5.0
        github.com/hashicorp/terraform-plugin-framework-validators v0.15.0

Use Cases or Problem Statement

The AWS provider recently implemented a bug fix which included a custom set validator to check for null values. In our use case null values could not be used with the underlying AWS API, and therefore should be surfaced as errors as early as possible. A similar validator could be implemented for list types.

Similar to #231, I'm not sure if this use case is a common enough to warrant moving up into this repository but again thought I'd offer up our implementation in case.

Proposal

Add a new NoNullValues validator to the setvalidator and listvalidator packages.

I derived the name from the UniqueValues list validator, but am open to any suggestions.

Additional Information

Relates hashicorp/terraform-provider-aws#40076

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jar-b jar-b added the enhancement New feature or request label Nov 11, 2024
@jar-b jar-b changed the title NonNullValues validator for list and set types NoNullValues validator for list and set types Nov 12, 2024
@jar-b jar-b linked a pull request Nov 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant