Files
floci/src/main/java/io
z9rtm 8ef71d6930 fix(cloudformation): honor resource-level conditions (#2255)
* fix(cloudformation): honor resource-level conditions

* fix: handle condition deletion failures

* fix(cloudformation): fail on unresolved condition dependencies instead of skipping

A resource that will be created must not depend on a resource excluded by a
false condition. Real CloudFormation rejects such a template synchronously at
CreateStack/UpdateStack with "Template format error: Unresolved resource
dependencies [X]" and provisions nothing, rather than silently skipping the
dependent (verified against AWS for DependsOn and Ref/Fn::Sub).

Validate the condition dependency graph in createChangeSet before any stack
state is created, and throw the same ValidationError from topologicalSort as a
safety net for nested/direct executions. Fn::If-guarded references remain valid
because dependency collection only walks the selected branch.

Tests cover: DependsOn and Ref/Fn::Sub unresolved dependencies fail; an
Fn::If-guarded false-branch reference is created; and a false->true condition
update creates the previously-skipped resource.

* fix: evaluate stackset conditions in target account

* fix(cloudformation): retain failed cleanup resources
2026-08-15 09:11:49 -04:00
..