Sns topic update functionality #12777
Open
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.
Related PR: #12768
Motivation
This PR implements comprehensive update support for the AWS::SNS::Topic CloudFormation resource, addressing the core requirement to enable updates for DisplayName, TopicName, and Tags properties. The implementation follows AWS CloudFormation's update semantics, including resource replacement when immutable properties change.
Changes
Enhanced Resource Provider (
aws_sns_topic.py
)Implemented complete
update()
method with support for:DisplayName
attribute changesTopicName
changes (recreates topic with new name)Key features:
Comprehensive Test Coverage (
test_sns.py
)Created
test_sns_topic_update_attributes()
with in-place updates (no resource replacement):DisplayName
attribute changes are applied correctlyCreated
test_sns_topic_update_name()
with resource replacement:Added new entries to the Snapshot File (
test_sns.snapshot.json
)Testing
TODO
Test against AWS and find out whytest_sns_topic_update_name
test fails on AWS but not locally.Proposed Next Steps
1: Complete Core Properties
2: Advanced Update Capabilities
3: Robustness & Edge Cases
4: Testing