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

all: Remove remaining Block-based MaxItems and MinItems functionality #577

Merged
merged 3 commits into from Dec 13, 2022

Conversation

bflad
Copy link
Member

@bflad bflad commented Dec 13, 2022

Closes #437

Block MaxItems and MinItems support, while defined in the Terraform protocol, is intentionally not included in the newer schema handling. Terraform can only perform limited static analysis of blocks and errors generated occur before the provider is called for configuration validation, which means that practitioners do not get all configuration errors at the same time. Provider developers can implement validators to achieve the same validation functionality, for example using the listvalidator.Size* and setvalidator.Size* validators in the terraform-plugin-framework-validators Go module.

@bflad bflad added the tech-debt Issues tracking technical debt that we're carrying. label Dec 13, 2022
@bflad bflad added this to the v1.0.0 milestone Dec 13, 2022
@bflad bflad requested a review from a team as a code owner December 13, 2022 05:27
Copy link
Contributor

@bendbennett bendbennett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@bflad bflad force-pushed the bflad/tfsdk-Schema-removals-part-two branch from c7608ec to 29fad47 Compare December 13, 2022 14:29
Base automatically changed from bflad/tfsdk-Schema-removals-part-two to main December 13, 2022 14:32
Reference: #132
Reference: #326
Reference: #491

Refer to the following pull request descriptions for migration information about migrating to the split schema packages:

- `datasource/schema`: #546
- `provider/schema`: #553
- `resource/schema`: #558
- `provider/metaschema`: #562
Reference: #437

Block MaxItems and MinItems support, while defined in the Terraform protocol, is intentially not included in the newer schema handling. Terraform can only perform limited static analysis of blocks and errors generated occur before the provider is called for configuration validation, which means that practitioners do not get all configuration errors at the same time. Provider developers can implement validators to achieve the same validation functionality, for example using the `listvalidator.Size*` and `setvalidator.Size*` validators in the terraform-plugin-framework-validators Go module.
@bflad bflad force-pushed the bflad/minitems-maxitems-removals branch from 003c041 to 208ed78 Compare December 13, 2022 14:34
@bflad bflad merged commit ea5dd66 into main Dec 13, 2022
15 checks passed
@bflad bflad deleted the bflad/minitems-maxitems-removals branch December 13, 2022 14:40
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, 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 Jan 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tech-debt Issues tracking technical debt that we're carrying.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider Removing Block MaxItems/MinItems Fields
2 participants