This repository was archived by the owner on Mar 23, 2026. It is now read-only.
CFn: correctly skip conditionally disabled resources#13238
Merged
Conversation
Test Results - Alternative Providers577 tests 330 ✅ 26m 16s ⏱️ Results for commit ebf3c17. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 39m 36s ⏱️ Results for commit ebf3c17. |
pinzon
approved these changes
Oct 8, 2025
Member
There was a problem hiding this comment.
Praise: Glad the new engine is easily modifiable.
|
|
||
| @markers.aws.validated | ||
| @pytest.mark.skipif(condition=not is_aws_cloud(), reason="not supported yet") | ||
| @skip_if_legacy_engine() |
Member
There was a problem hiding this comment.
Nit: Consider adding a validation test about a situation where an output references a conditionally skip resource.
Contributor
Author
There was a problem hiding this comment.
Good idea, thanks! I'll tackle this in a follow up
baermat
pushed a commit
that referenced
this pull request
Oct 13, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When a template resource which is disabled by a condition references another resource that's disabled by a condition, the CFn engine currently incorrectly raises a
ValidationErrorin the transformer, validator and executor. This is not in parity with AWS. See thereferences_to_conditions.ymltemplate for an example.Changes
visit_node_resources/visit_node_outputsentirely in the preproc so we don't even evaluate the resource block during template preprocessing time