CloudFormation: Support intrinsic functions in DeletionPolicy and UpdateReplacePolicy#13679
Conversation
LocalStack Community integration with Pro 2 files ± 0 2 suites ±0 31m 29s ⏱️ - 1h 27m 5s Results for commit fb4e0c4. ± Comparison against base commit a8c43f2. This pull request removes 4595 and adds 4 tests. Note that renamed tests count towards both. |
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 43m 43s ⏱️ Results for commit fb4e0c4. |
Test Results - Alternative Providers586 tests 326 ✅ 18m 17s ⏱️ Results for commit fb4e0c4. |
pinzon
left a comment
There was a problem hiding this comment.
Thanks for these changes. Be aware that a couple of lines will conflict with this pr(#13535) from @simonrw .
🔴 And since the tests are mainly about DeletionPolicy and UpdatePolicy we should move the tests to the new test files for them. So my recommendation would be to wait until Simon's PR is merged.
Motivation
As reported in #13549, CloudFormation templates using intrinsic functions (such as
Fn::If,Fn::FindInMap, orRef) inDeletionPolicyandUpdateReplacePolicyattributes were failing with aRuntimeErrorduring stack creation. This prevented users from implementing environment-specific or parameter-driven resource lifecycle policies, which works correctly in AWS CloudFormation.Changes
_visit_deletion_policy()and_visit_update_replace_policy()methods inchange_set_model.pyto acceptChangeSetEntityinstead ofTerminalValue, allowing intrinsic functionsTests
Added validated tests to capture the previously failing scenarios.
Related
Closes #13549