8000 Propagate unchanged resource state · localstack/localstack@4ad07df · GitHub
[go: up one dir, main page]

Skip to content

Commit 4ad07df

Browse files
committed
Propagate unchanged resource state
1 parent 7c2dba6 commit 4ad07df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

localstack-core/localstack/services/cloudformation/engine/v2/change_set_model_executor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ def _execute_on_resource_change(
121121
self, name: str, before: Optional[PreprocResource], after: Optional[PreprocResource]
122122
) -> None:
123123
if before == after:
124-
# unchanged: nothing to do.
124+
# unchanged: nothing to do but propagate the previous state to the new state.
125+
if before_properties := self._before_resolved_resources.get(name):
126+
self.resources[name] = before_properties.copy()
125127
return
126128
# TODO: this logic is a POC and should be revised.
127129
if before is not None and after is not None:

0 commit comments

Comments
 (0)
0