fix(cloudformation): report CREATE events for a resource an update adds (#4932)

A logical id the stack did not hold before an UpdateStack is created, so AWS
reports CREATE_IN_PROGRESS and CREATE_COMPLETE (or CREATE_FAILED) for it and
DescribeStackResource shows CREATE_COMPLETE. Floci used the stack-wide update
flag and reported UPDATE_* instead. The resource loop now decides per resource
from whether the stack held it; stack-level statuses and the rollback of an
added resource are unchanged.
This commit is contained in:
Mario Toffia authored and GitHub committed 2026-10-11 15:12:12 -04:00
1 parent e28c58cc8a
commit 8c61aa441d
4 files changed
+151 -4

No files matched your search

@@ -141,7 +141,7 @@ class CloudFormationLogsMetricFilterTest {
assertThat(filters()).hasSize(1);
List<StackEvent> events = newEvents();
int changed = indexOf(events, "Filter", "UPDATE_COMPLETE", target);
int failed = indexOf(events, "BadSecret", "UPDATE_FAILED", null);
int failed = indexOf(events, "BadSecret", "CREATE_FAILED", null);
assertThat(changed).as("filter update completed before dependent failure").isGreaterThanOrEqualTo(0);
assertThat(failed).isGreaterThan(changed);
assertSample("WARN", 2, null);