Skip to content

The terraform module for setup SNS on AWS cloud

License

Notifications You must be signed in to change notification settings

pogosoftware/terraform-aws-sns

Repository files navigation

terraform-aws-sns

Requirements

Name Version
terraform ~> 1.0

Providers

No providers.

Modules

Name Source Version
sns_subscription ./modules/sns_subscription n/a
sns_topic ./modules/sns_topic n/a
sns_topic_policy ./modules/sns_topic_policy n/a

Resources

No resources.

Inputs

Name Description Type Default Required
attach_sns_topic_policy Determinate to attach policy to sns_topic or not bool false no
create_sns_subscription Determinate to create sns_subscription resource or not bool true no
create_sns_topic Determinate to create sns_topic resource or not bool true no
sns_subscription_confirmation_timeout_in_minutes Integer indicating number of minutes to wait in retrying mode for fetching subscription arn before marking it as failure. Only applicable for http and https protocols. Default is 1 number 1 no
sns_subscription_delivery_policy JSON String with the delivery policy (retries, backoff, etc.) that will be used in the subscription - this only applies to HTTP/S subscriptions string null no
sns_subscription_endpoint Required if create_sns_subscription is set to true. Endpoint to send data to. The contents vary with the protocol string null no
sns_subscription_endpoint_auto_confirms Whether the endpoint is capable of auto confirming subscription (e.g., PagerDuty). Default is false bool false no
sns_subscription_filter_policy JSON String with the filter policy that will be used in the subscription to filter messages seen by the target resource string null no
sns_subscription_protocol Required if create_sns_subscription is set to true. Protocol to use. Valid values are: sqs, sms, lambda, firehose, and application. Protocols email, email-json, http and https are also valid but partially supported string null no
sns_subscription_raw_message_delivery Whether to enable raw message delivery (the original message is directly passed, not wrapped in JSON with the original message in the message property). Default is false bool false no
sns_subscription_redrive_policy JSON String with the redrive policy that will be used in the subscription string null no
sns_subscription_role_arn Required if create_sns_subscription is set to true. ARN of the IAM role to publish to Kinesis Data Firehose delivery stream string null no
sns_subscription_topic_arn Required if create_sns_subscription is set to true and create_sns_topic is set to false. ARN of the SNS topic to subscribe to string null no
sns_topic_application_failure_feedback_role_arn IAM role for failure feedback string null no
sns_topic_application_success_feedback_role_arn IAM role permitted to receive success feedback for this topic string null no
sns_topic_application_success_feedback_sample_rate Percentage of success to sample string null no
sns_topic_arn ARN of the SNS topic string null no
sns_topic_content_based_deduplication Enables content-based deduplication for FIFO topics string null no
sns_topic_delivery_policy The SNS delivery policy string null no
sns_topic_display_name The display name for the topic string null no
sns_topic_fifo_topic Boolean indicating whether or not to create a FIFO (first-in-first-out) topic (default is false) bool false no
sns_topic_firehose_failure_feedback_role_arn IAM role for failure feedback string null no
sns_topic_firehose_success_feedback_role_arn The IAM role permitted to receive success feedback for this topic string null no
sns_topic_firehose_success_feedback_sample_rate Percentage of success to sample string null no
sns_topic_http_failure_feedback_role_arn IAM role for failure feedback string null no
sns_topic_http_success_feedback_role_arn The IAM role permitted to receive success feedback for this topic string null no
sns_topic_http_success_feedback_sample_rate Percentage of success to sample string null no
sns_topic_kms_master_key_id The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK string null no
sns_topic_lambda_failure_feedback_role_arn IAM role for failure feedback string null no
sns_topic_lambda_success_feedback_role_arn The IAM role permitted to receive success feedback for this topic string null no
sns_topic_lambda_success_feedback_sample_rate Percentage of success to sample string null no
sns_topic_name Required if use_sns_topic_name_prefix is set to true. The name of the topic. Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long. For a FIFO (first-in-first-out) topic, the name must end with the .fifo suffix. If omitted, Terraform will assign a random, unique name string null no
sns_topic_policy The fully-formed AWS policy as JSON. For more information about building AWS IAM policy documents with Terraform, see the AWS IAM Policy Document Guide. string null no
sns_topic_sqs_failure_feedback_role_arn IAM role for failure feedback string null no
sns_topic_sqs_success_feedback_role_arn The IAM role permitted to receive success feedback for this topic string null no
sns_topic_sqs_success_feedback_sample_rate Percentage of success to sample string null no
sns_topic_tags Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level map(string) {} no
use_sns_topic_name_prefix Determinate to use name_prefix or not bool false no

Outputs

Name Description
sns_subscription_arn ARN of the subscription
sns_subscription_confirmation_was_authenticated Whether the subscription confirmation request was authenticated
sns_subscription_id ARN of the subscription
sns_subscription_owner_id AWS account ID of the subscription's owner
sns_subscription_pending_confirmation Whether the subscription has not been confirmed
sns_topic_arn The ARN of the SNS topic, as a more obvious property (clone of id)
sns_topic_id The ARN of the SNS topic
sns_topic_name The ARN of the SNS topic
sns_topic_owner The AWS Account ID of the SNS topic owner