sns-topic

cloudposse/sns-topic/aws

Terraform Module HCL AWS

Terraform Module to Provide an Amazon Simple Notification Service (SNS)

Install
module "sns-topic" {
source = "cloudposse/sns-topic/aws"
version = "1.2.0"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform module to provision SNS topic > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Introduction This module provides: - SNS topic creation - SNS topic policy - SNS topic subscriptions It's possible to subscribe SQS as Dead Letter Queue. Usage Amazon Simple Notification Service (Amazon SNS) is a web service that coordinates and manages the delivery or sending of messages to subscribing endpoints or clients. SNS documentation There are many ways SNS can be used. As an example we can imagine CloudWatch sending alerts to SNS,

Inputs (35)
NameTypeDescriptionDefault
content_based_deduplicationboolEnable content-based deduplication for FIFO topicsfalse
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
additional_tag_mapmap(string)Additional key-value pairs to add to each map in `tags_as_list_of_maps`. Not add{}
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
sqs_dlq_enabledboolEnable delivery of failed notifications to SQS and monitor messages in queue.false
delivery_statusobject({ application = optEnable Message delivery status for the various SNS subscription endpoints. The s{}
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
subscribersmap(object({ protocol = stRequired configuration for subscibres to SNS topic.{}
sns_topic_policy_jsonstringThe fully-formed AWS policy as JSON""
fifo_queue_enabledboolWhether or not to create a FIFO (first-in-first-out) queuefalse
sqs_dlq_message_retention_secondsnumberThe number of seconds Amazon SQS retains a message. Integer representing seconds1209600
delivery_policystringThe SNS delivery policy as JSON.null
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
sqs_queue_kms_data_key_reuse_period_secondsnumberThe length of time, in seconds, for which Amazon SQS can reuse a data key to enc300
allowed_iam_arns_for_sns_publishlist(string)IAM role/user ARNs that will have permission to publish to SNS topic. Used when []
sqs_dlq_max_message_sizenumberThe limit of how many bytes a message can contain before Amazon SQS rejects it. 262144
id_length_limitnumberLimit `id` to this many characters (minimum 6). Set to `0` for unlimited length.null
label_value_casestringControls the letter case of ID elements (labels) as included in `id`, set as tagnull
Outputs (10)
sns_topic — SNS topic.
sns_topic_name — SNS topic name.
sns_topic_id — SNS topic ID.
sns_topic_owner — SNS topic owner.
dead_letter_queue_url — The URL for the created dead letter SQS queue.
dead_letter_queue_name — The name for the created dead letter queue.
dead_letter_queue_arn — The ARN of the dead letter queue.
sns_topic_arn — SNS topic ARN.
aws_sns_topic_subscriptions — SNS topic subscription.
dead_letter_queue_id — The ID for the created dead letter queue. Same as the URL.
Resources (5)
aws_sns_topicaws_sns_topic_policyaws_sns_topic_subscriptionaws_sqs_queueaws_sqs_queue_policy
Details
FrameworkTerraform Module
LanguageHCL
Version1.2.0
Cloud AWS
★ Stars49
Forks51
Total downloads8.1M
Inputs35
Outputs10
Resources5
Examples1
Namespacecloudposse
Updated