Skip to content

Latest commit

 

History

History

sns

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

A wrapper on the SNS module that enfores a customer managed KMS key. You can either supply your own KMS ARN as kms_master_key_id or let the module create their own key. If you choose to let the module create a KMS key it will also include an IAM policy that allows access from the root user of the account. You can also supply service like s3.amazonaws.com or sns.amazonaws.com in the kms_event_sources list, as well as IAM roles in the kms_iam_sources list who will then have kms:Decrypt* and kms:GenerateDataKey* permissions on the key.

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_kms_key.sns_key resource
aws_sns_topic.this resource
aws_caller_identity.current data source
aws_iam_policy_document.kms_policies data source

Inputs

Name Description Type Default Required
application_failure_feedback_role_arn (Optional) IAM role for failure feedback string null no
application_success_feedback_role_arn (Optional) The IAM role permitted to receive success feedback for this topic string null no
application_success_feedback_sample_rate (Optional) Percentage of success to sample number null no
billing_tag_key (Optional, default 'CostCentre') The name of the billing tag string "CostCentre" no
billing_tag_value (Required) The value of the billing tag string null no
content_based_deduplication (Optional) Enables content-based deduplication for FIFO topics. For more information, see the related documentation bool false no
delivery_policy (Optional) The SNS delivery policy. More on AWS documentation string null no
display_name (Optional) The display name for the topic string null no
fifo_topic (Optional) Boolean indicating whether or not to create a FIFO (first-in-first-out) topic (default is false). bool false no
firehose_failure_feedback_role_arn (Optional) IAM role for failure feedback string null no
firehose_success_feedback_role_arn (Optional) The IAM role permitted to receive success feedback for this topic string null no
firehose_success_feedback_sample_rate (Optional) Percentage of success to sample number null no
http_failure_feedback_role_arn (Optional) IAM role for failure feedback string null no
http_success_feedback_role_arn (Optional) The IAM role permitted to receive success feedback for this topic string null no
http_success_feedback_sample_rate (Optional) Percentage of success to sample number null no
kms_event_sources (Optional) List of AWS services that can access the topic. list(string) [] no
kms_iam_sources (Optional) List of AWS IAM role sources that can access the topic. list(string) [] no
kms_master_key_id (Optional) The ARN of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. For more information, see Key Terms string null no
lambda_failure_feedback_role_arn (Optional) IAM role for failure feedback string null no
lambda_success_feedback_role_arn (Optional) The IAM role permitted to receive success feedback for this topic string null no
lambda_success_feedback_sample_rate (Optional) Percentage of success to sample number null no
name 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. Conflicts with name_prefix string n/a yes
name_prefix (Optional) Creates a unique name beginning with the specified prefix. Conflicts with name string null no
policy (Optional) 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
sqs_failure_feedback_role_arn (Optional) IAM role for failure feedback string null no
sqs_success_feedback_role_arn (Optional) The IAM role permitted to receive success feedback for this topic string null no
sqs_success_feedback_sample_rate (Optional) Percentage of success to sample number null no
tags (Optional) 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

Outputs

Name Description
kms_key_arn KMS Key ARN used for SNS
sns_arn The ARN of the SNS topic.
sns_id The name of the SNS topic.