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

Add "not null" validator for listvalidator, setvalidator, and objectvalidator #105

Closed
1 task done
austinvalle opened this issue Feb 3, 2023 · 1 comment · Fixed by #107
Closed
1 task done
Assignees
Labels
enhancement New feature or request

Comments

@austinvalle
Copy link
Member

austinvalle commented Feb 3, 2023

Terraform CLI and Framework Versions

Terraform v1.3.7
on darwin_arm64

github.com/hashicorp/terraform-plugin-framework v1.1.1

Use Cases or Problem Statement

In relation to blocks, in the SDKv2 you could apply the Required field like so:
https://github.com/hashicorp/terraform-provider-cloudinit/blob/b91da5224dbf17a3302633a3643ebf44c686c148/internal/provider/datasource_cloudinit_config.go#L25

This functionality is currently only present for Attributes as that is preferable over using blocks for newer schema development.

Proposal

  • Add a "not null" validator for usage with listvalidator, setvalidator, and objectvalidator
  • Document in comments + migration guide that this validator is typically only for usage with blocks, otherwise you should use the Required field.

Additional Information

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
1 participant