Skip to content

fix: restrict property validation to reachable regional scenarios - #4756

Open
proton0210 wants to merge 2 commits into
aws-cloudformation:mainfrom
proton0210:fix/region-aware-conditions
Open

proton0210 wants to merge 2 commits into
aws-cloudformation:mainfrom
proton0210:fix/region-aware-conditions

Conversation

@proton0210

Copy link
Copy Markdown
Contributor

Closes #4746.

Region-specific conditions previously allowed property validation to inspect branches and resources that cannot exist in the selected region. Constrain condition scenarios per region, including when provider schemas are shared, and carry those constraints through property and gathered-resource checks. Validate primary identifiers separately for each region and correct the legacy region-scenario Cartesian product.

Preserve condition metadata across evolution and keep intentional regional branches from producing universal unreachable-branch warnings. Regression coverage includes all five reported templates, mixed-region runs in both orders, nested conditions, and contradictory regional combinations. Update existing expectations only for findings on branches or resources excluded in the linted region.

Validation: the full unit suite and focused integration checks passed. Three audit passes covered upstream reproduction, non-regression/edge-case checks, and final combined source review (3,027 unit/integration tests passed plus the separate schema-updater test; four data tests retain the default exclusion).

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.

Fn::If branches and Condition-gated resources are validated in regions where the condition cannot be true

1 participant