Module library

SNS

Terraform module to create AWS SNS resources

Version

Inputs

28
application_feedbackoptionalobject({ failure_role_arn = optional(string) success_role_arn = optional(string)…

Map of IAM role ARNs and sample rate for success and failure feedback

Default{}
archive_policyoptionalstring

The message archive policy for FIFO topics

Defaultnull
content_based_deduplicationoptionalbool

Boolean indicating whether or not to enable content-based deduplication for FIFO topics

Defaultfalse
createoptionalbool

Determines whether resources will be created (affects all resources)

Defaulttrue
create_subscriptionoptionalbool

Determines whether an SNS subscription is created

Defaulttrue
create_topic_policyoptionalbool

Determines whether an SNS topic policy is created

Defaulttrue
data_protection_policyoptionalstring

A map of data protection policy statements

Defaultnull
delivery_policyoptionalstring

The SNS delivery policy

Defaultnull
display_nameoptionalstring

The display name for the SNS topic

Defaultnull
enable_default_topic_policyoptionalbool

Specifies whether to enable the default topic policy. Defaults to `true`

Defaulttrue
fifo_throughput_scopeoptionalstring

Enables higher throughput for FIFO topics by adjusting the scope of deduplication. This attribute has two possible values, Topic and MessageGroup

Defaultnull
fifo_topicoptionalbool

Boolean indicating whether or not to create a FIFO (first-in-first-out) topic

Defaultfalse
firehose_feedbackoptionalobject({ failure_role_arn = optional(string) success_role_arn = optional(string)…

Map of IAM role ARNs and sample rate for success and failure feedback

Default{}
http_feedbackoptionalobject({ failure_role_arn = optional(string) success_role_arn = optional(string)…

Map of IAM role ARNs and sample rate for success and failure feedback

Default{}
kms_master_key_idoptionalstring

The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK

Defaultnull
lambda_feedbackoptionalobject({ failure_role_arn = optional(string) success_role_arn = optional(string)…

Map of IAM role ARNs and sample rate for success and failure feedback

Default{}
nameoptionalstring

The name of the SNS topic to create

Defaultnull
override_topic_policy_documentsoptionallist(string)

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`

Default[]
regionoptionalstring

Region where the resource(s) will be managed. Defaults to the Region set in the provider configuration

Defaultnull
signature_versionoptionalnumber

If SignatureVersion should be `1` (`SHA1`) or `2` (`SHA256`). The signature version corresponds to the hashing algorithm used while creating the signature of the notifications, subscription confirmations, or unsubscribe confirmation messages sent by Amazon SNS

Defaultnull
source_topic_policy_documentsoptionallist(string)

List of IAM policy documents that are merged together into the exported document. Statements must have unique `sid`s

Default[]
sqs_feedbackoptionalobject({ failure_role_arn = optional(string) success_role_arn = optional(string)…

Map of IAM role ARNs and sample rate for success and failure feedback

Default{}
subscriptionsoptionalmap(object({ confirmation_timeout_in_minutes = optional(number) delivery_policy …

A map of subscription definitions to create

Default{}
tagsoptionalmap(string)

A map of tags to add to all resources

Default{}
topic_policyoptionalstring

An externally created fully-formed AWS policy as JSON

Defaultnull
topic_policy_statementsoptionalmap(object({ sid = optional(string) actions = optional(list(string)) not_actions…

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

Defaultnull
tracing_configoptionalstring

Tracing mode of an Amazon SNS topic. Valid values: `PassThrough`, `Active`

Defaultnull
use_name_prefixoptionalbool

Determines whether `name` is used as a prefix

Defaultfalse

All 28 are optional — the module deploys with none of them set.

Outputs

6
subscriptions

Map of subscriptions created and their attributes

topic_arn

The ARN of the SNS topic, as a more obvious property (clone of id)

topic_beginning_archive_time

The oldest timestamp at which a FIFO topic subscriber can start a replay

topic_id

The ARN of the SNS topic

topic_name

The name of the topic

topic_owner

The AWS Account ID of the SNS topic owner

What the agent wires into the next module. An edge on the architecture diagram is one of these consumed by something else.