-
Notifications
You must be signed in to change notification settings - Fork 398
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for subscriptions attributes parameter - currently only f…
…or RawMessageDelievery (SQS) (#640) (#1302) [PR #640/932263d4 backport][stable-4] Add support for SQS RawMessageDelievery attribute in subscriptions - issue #193 This is a backport of PR #640 as merged into main (932263d). SUMMARY Added support to configure RawMessageDelievery option when configuring sqs endpoints. It use boto3 set_subscription_attributes() to configure changes. It currently supports only this option, but should be easily extended in the future. Attributes are expected in the form as in the boto3 docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sns.html#SNS.Client.set_subscription_attributes Fixes #193 ISSUE TYPE Feature Pull Request COMPONENT NAME updates sns_topic.py to support new functionality example: - sns_topic: name: '{{ sns_topic_topic_name }}' display_name: My new topic name subscriptions: - endpoint: "{{ sqs_arn }}" protocol: sqs attributes: RawMessageDelivery: true Reviewed-by: Mark Chappell <None>
- Loading branch information
1 parent
9d0bdb2
commit f25a79d
Showing
4 changed files
with
111 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
minor_changes: | ||
- sns_topic - Added ``attributes`` parameter to ``subscriptions`` items with support for RawMessageDelievery (SQS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
# we hash the resource_prefix to get a shorter, unique string | ||
sns_topic_topic_name: "ansible-test-{{ tiny_prefix }}-topic" | ||
sns_sqs_subscription_attributes: {} | ||
sns_topic_subscriptions: | ||
- endpoint: "{{ sns_topic_subscriber_arn }}" | ||
protocol: "lambda" | ||
- endpoint: "{{ sns_topic_subscriber_sqs_arn }}" | ||
protocol: sqs | ||
attributes: "{{ sns_sqs_subscription_attributes }}" | ||
sns_topic_third_party_topic_arn: "arn:aws:sns:us-east-1:806199016981:AmazonIpSpaceChanged" | ||
sns_topic_third_party_region: "{{ sns_topic_third_party_topic_arn.split(':')[3] }}" | ||
|
||
# additional test resource namings | ||
sns_topic_lambda_function: "sns_topic_lambda" | ||
sns_topic_lambda_name: "ansible-test-{{ tiny_prefix }}-{{ sns_topic_lambda_function }}" | ||
sns_topic_lambda_role: "ansible-test-{{ tiny_prefix }}-sns-lambda" | ||
|
||
sns_topic_sqs_name: "ansible-test-{{ tiny_prefix }}-sns" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters