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

New Checks: XS003: Check Schema for potential panic/diff #236

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

magodo
Copy link
Contributor

@magodo magodo commented Apr 22, 2021

The XS003 analyzer reports cases of schemas where a non-computed nested block property of TypeList contains optional-only and non-default child properties, which has no AtLeastOneOf/ExactlyOneOf constraint.

This kind of schema causes panic like in hashicorp/terraform-provider-azurerm#11426 (and more). Also, if we work this kind of issue around during expanding, an empty block will still cause noising plan diff. A good solution is to add the constraint in schema.

This check has help AzureRM provider codebase to detect ~100 schemas that have panic risk (hashicorp/terraform-provider-azurerm#11452).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant