You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <aname="input_application_failure_feedback_role_arn"></a> [application\_failure\_feedback\_role\_arn](#input\_application\_failure\_feedback\_role\_arn)| IAM role for failure feedback |`string`|`null`| no |
49
-
| <aname="input_application_success_feedback_role_arn"></a> [application\_success\_feedback\_role\_arn](#input\_application\_success\_feedback\_role\_arn)| The IAM role permitted to receive success feedback for this topic |`string`|`null`| no |
50
-
| <aname="input_application_success_feedback_sample_rate"></a> [application\_success\_feedback\_sample\_rate](#input\_application\_success\_feedback\_sample\_rate)| Percentage of success to sample |`string`|`null`| no |
164
+
| <aname="input_application_feedback"></a> [application\_feedback](#input\_application\_feedback)| Map of IAM role ARNs and sample rate for success and failure feedback |`map(string)`|`{}`| no |
51
165
| <aname="input_content_based_deduplication"></a> [content\_based\_deduplication](#input\_content\_based\_deduplication)| Boolean indicating whether or not to enable content-based deduplication for FIFO topics. |`bool`|`false`| no |
52
-
| <aname="input_create_sns_topic"></a> [create\_sns\_topic](#input\_create\_sns\_topic)| Whether to create the SNS topic |`bool`|`true`| no |
166
+
| <aname="input_create"></a> [create](#input\_create)| Determines whether resources will be created (affects all resources) |`bool`|`true`| no |
167
+
| <aname="input_create_subscription"></a> [create\_subscription](#input\_create\_subscription)| Determines whether an SNS subscription is created |`bool`|`true`| no |
168
+
| <aname="input_create_topic_policy"></a> [create\_topic\_policy](#input\_create\_topic\_policy)| Determines whether an SNS topic policy is created |`bool`|`true`| no |
53
169
| <aname="input_delivery_policy"></a> [delivery\_policy](#input\_delivery\_policy)| The SNS delivery policy |`string`|`null`| no |
54
170
| <aname="input_display_name"></a> [display\_name](#input\_display\_name)| The display name for the SNS topic |`string`|`null`| no |
171
+
| <aname="input_enable_default_topic_policy"></a> [enable\_default\_topic\_policy](#input\_enable\_default\_topic\_policy)| Specifies whether to enable the default topic policy. Defaults to `true`|`bool`|`true`| no |
55
172
| <aname="input_fifo_topic"></a> [fifo\_topic](#input\_fifo\_topic)| Boolean indicating whether or not to create a FIFO (first-in-first-out) topic |`bool`|`false`| no |
56
-
| <aname="input_firehose_failure_feedback_role_arn"></a> [firehose\_failure\_feedback\_role\_arn](#input\_firehose\_failure\_feedback\_role\_arn)| IAM role for failure feedback |`string`|`null`| no |
57
-
| <aname="input_firehose_success_feedback_role_arn"></a> [firehose\_success\_feedback\_role\_arn](#input\_firehose\_success\_feedback\_role\_arn)| The IAM role permitted to receive success feedback for this topic |`string`|`null`| no |
58
-
| <aname="input_firehose_success_feedback_sample_rate"></a> [firehose\_success\_feedback\_sample\_rate](#input\_firehose\_success\_feedback\_sample\_rate)| Percentage of success to sample |`number`|`null`| no |
59
-
| <aname="input_http_failure_feedback_role_arn"></a> [http\_failure\_feedback\_role\_arn](#input\_http\_failure\_feedback\_role\_arn)| IAM role for failure feedback |`string`|`null`| no |
60
-
| <aname="input_http_success_feedback_role_arn"></a> [http\_success\_feedback\_role\_arn](#input\_http\_success\_feedback\_role\_arn)| The IAM role permitted to receive success feedback for this topic |`string`|`null`| no |
61
-
| <aname="input_http_success_feedback_sample_rate"></a> [http\_success\_feedback\_sample\_rate](#input\_http\_success\_feedback\_sample\_rate)| Percentage of success to sample |`string`|`null`| no |
173
+
| <aname="input_firehose_feedback"></a> [firehose\_feedback](#input\_firehose\_feedback)| Map of IAM role ARNs and sample rate for success and failure feedback |`map(string)`|`{}`| no |
174
+
| <aname="input_http_feedback"></a> [http\_feedback](#input\_http\_feedback)| Map of IAM role ARNs and sample rate for success and failure feedback |`map(string)`|`{}`| no |
62
175
| <aname="input_kms_master_key_id"></a> [kms\_master\_key\_id](#input\_kms\_master\_key\_id)| The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK |`string`|`null`| no |
63
-
| <aname="input_lambda_failure_feedback_role_arn"></a> [lambda\_failure\_feedback\_role\_arn](#input\_lambda\_failure\_feedback\_role\_arn)| IAM role for failure feedback |`string`|`null`| no |
64
-
| <aname="input_lambda_success_feedback_role_arn"></a> [lambda\_success\_feedback\_role\_arn](#input\_lambda\_success\_feedback\_role\_arn)| The IAM role permitted to receive success feedback for this topic |`string`|`null`| no |
65
-
| <aname="input_lambda_success_feedback_sample_rate"></a> [lambda\_success\_feedback\_sample\_rate](#input\_lambda\_success\_feedback\_sample\_rate)| Percentage of success to sample |`string`|`null`| no |
176
+
| <aname="input_lambda_feedback"></a> [lambda\_feedback](#input\_lambda\_feedback)| Map of IAM role ARNs and sample rate for success and failure feedback |`map(string)`|`{}`| no |
66
177
| <aname="input_name"></a> [name](#input\_name)| The name of the SNS topic to create |`string`|`null`| no |
67
-
| <aname="input_name_prefix"></a> [name\_prefix](#input\_name\_prefix)| The prefix name of the SNS topic to create |`string`|`null`| no |
68
-
| <aname="input_policy"></a> [policy](#input\_policy)| The fully-formed AWS policy as JSON |`string`|`null`| no |
69
-
| <aname="input_sqs_failure_feedback_role_arn"></a> [sqs\_failure\_feedback\_role\_arn](#input\_sqs\_failure\_feedback\_role\_arn)| IAM role for failure feedback |`string`|`null`| no |
70
-
| <aname="input_sqs_success_feedback_role_arn"></a> [sqs\_success\_feedback\_role\_arn](#input\_sqs\_success\_feedback\_role\_arn)| The IAM role permitted to receive success feedback for this topic |`string`|`null`| no |
71
-
| <aname="input_sqs_success_feedback_sample_rate"></a> [sqs\_success\_feedback\_sample\_rate](#input\_sqs\_success\_feedback\_sample\_rate)| Percentage of success to sample |`string`|`null`| no |
72
-
| <aname="input_tags"></a> [tags](#input\_tags)| A mapping of tags to assign to all resources |`map(string)`|`{}`| no |
178
+
| <aname="input_override_topic_policy_documents"></a> [override\_topic\_policy\_documents](#input\_override\_topic\_policy\_documents)| List of IAM policy documents that are merged together into the exported document. In merging, statements with non-blank `sid`s will override statements with the same `sid`|`list(string)`|`[]`| no |
179
+
| <aname="input_source_topic_policy_documents"></a> [source\_topic\_policy\_documents](#input\_source\_topic\_policy\_documents)| List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s |`list(string)`|`[]`| no |
180
+
| <aname="input_sqs_feedback"></a> [sqs\_feedback](#input\_sqs\_feedback)| Map of IAM role ARNs and sample rate for success and failure feedback |`map(string)`|`{}`| no |
181
+
| <aname="input_subscriptions"></a> [subscriptions](#input\_subscriptions)| A map of subscription definitions to create |`any`|`{}`| no |
182
+
| <aname="input_tags"></a> [tags](#input\_tags)| A map of tags to add to all resources |`map(string)`|`{}`| no |
183
+
| <aname="input_topic_policy"></a> [topic\_policy](#input\_topic\_policy)| An externally created fully-formed AWS policy as JSON |`string`|`null`| no |
184
+
| <aname="input_topic_policy_statements"></a> [topic\_policy\_statements](#input\_topic\_policy\_statements)| A map of IAM policy [statements](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document#statement) for custom permission usage |`any`|`{}`| no |
185
+
| <aname="input_use_name_prefix"></a> [use\_name\_prefix](#input\_use\_name\_prefix)| Determines whether `name` is used as a prefix |`bool`|`false`| no |
73
186
74
187
## Outputs
75
188
76
189
| Name | Description |
77
190
|------|-------------|
78
-
| <aname="output_sns_topic_arn"></a> [sns\_topic\_arn](#output\_sns\_topic\_arn)| ARN of SNS topic |
79
-
| <aname="output_sns_topic_id"></a> [sns\_topic\_id](#output\_sns\_topic\_id)| ID of SNS topic |
80
-
| <aname="output_sns_topic_name"></a> [sns\_topic\_name](#output\_sns\_topic\_name)| NAME of SNS topic |
81
-
| <aname="output_sns_topic_owner"></a> [sns\_topic\_owner](#output\_sns\_topic\_owner)| OWNER of SNS topic |
191
+
| <aname="output_subscriptions"></a> [subscriptions](#output\_subscriptions)| Map of subscriptions created and their attributes |
192
+
| <aname="output_topic_arn"></a> [topic\_arn](#output\_topic\_arn)| The ARN of the SNS topic, as a more obvious property (clone of id) |
193
+
| <aname="output_topic_id"></a> [topic\_id](#output\_topic\_id)| The ARN of the SNS topic |
194
+
| <aname="output_topic_name"></a> [topic\_name](#output\_topic\_name)| The name of the topic |
195
+
| <aname="output_topic_owner"></a> [topic\_owner](#output\_topic\_owner)| The AWS Account ID of the SNS topic owner |
If you have any questions regarding this upgrade process, please consult the [`examples`](https://github.com/terraform-aws-modules/terraform-aws-sns/tree/master/examples/complete) directory:
4
+
5
+
If you find a bug, please open an issue with supporting configuration to reproduce.
6
+
7
+
## List of backwards incompatible changes
8
+
9
+
-`create_sns_topic` has been renamed to `create`
10
+
-`policy` has been renamed to `topic_policy`
11
+
-`name_prefix` has been replaced with the combination of `name` and `use_name_prefix = true` to ensure only one value is provided
12
+
-`*_failure_feedback_role_arn`, `*_success_feedback_role_arn`, `*_success_feedback_sample_rate` variables have been replaced with a respective top level variable that contains a map to the three attributes. See before and after below for further clarification.
13
+
- Outputs have had the `sns_` prefix stripped from their names
14
+
15
+
## Additional changes
16
+
17
+
### Added
18
+
19
+
- Support for topic policy creation and subscriptions
Please note - the examples provided serve two primary means:
4
+
5
+
1. Show users working examples of the various ways in which the module can be configured and features supported
6
+
2. A means of testing/validating module changes
7
+
8
+
Please do not mistake the examples provided as "best practices". It is up to users to consult the AWS service documentation for best practices, usage recommendations, etc.
0 commit comments