This terraform module creates sns topic and associated resources.
Examples available here
NOTE: These examples use the latest version of this module
locals {
name = "minimum-sns-topic"
}
module "minimum_sns_topic" {
source = "../../"
name = local.name
tags = {
Name = local.name
Environment = "Dev"
}
}
Terraform provider documentation
Name | Version |
---|---|
terraform | >= 0.14.11 |
aws | >= 4.0.0 |
Name | Version |
---|---|
aws | 4.63.0 |
No modules.
Name | Type |
---|---|
aws_kms_alias.sns | resource |
aws_kms_key.sns | resource |
aws_sns_topic.main | resource |
aws_sns_topic_subscription.main | resource |
aws_caller_identity.current | data source |
aws_partition.current | data source |
aws_region.current | data source |
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 | string |
null |
no |
content_based_deduplication | (Optional) Enables content-based deduplication for FIFO topics. | string |
null |
no |
create_kms_key | Choose whether to create kms key for sns | bool |
false |
no |
delivery_policy | (Optional) The SNS delivery policy. | string |
null |
no |
display_name | (Optional) The display name for the topic | string |
null |
no |
enable_key_rotation | Choose whether to enable key rotation | bool |
true |
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 | string |
null |
no |
key_deletion_window | The waiting period, specified in number of days. After the waiting period ends, AWS KMS deletes the KMS key. If you specify a value, it must be between 7 and 30, inclusive. If you do not specify a value, it defaults to 30. | number |
7 |
no |
kms_master_key_arn | (Optional) The ARN of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. | 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 | (Optional) 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 |
null |
no |
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. | string |
null |
no |
sns_topic_subscriptions | Resource block for sns topic subscriptions | any |
{} |
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 |
Name | Description |
---|---|
arn | The ARN of the SNS topic, as a more obvious property (clone of id) |
id | The ARN of the SNS topic |
owner | The AWS Account ID of the SNS topic owner |
subscription_arn | ARN of the subscription. |
subscription_confirmation_was_authenticated | Whether the subscription confirmation request was authenticated. |
subscription_id | ARN of the subscription. |
subscription_owner_id | AWS account ID of the subscription's owner. |
subscription_pending_confirmation | Whether the subscription has not been confirmed. |
tags_all | A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block. |
This repository uses third party software:
- pre-commit - Used to help ensure code and documentation consistency
- Install with
brew install pre-commit
- Manually use with
pre-commit run
- Install with
- terraform 0.14.11 For backwards compatibility we are using version 0.14.11 for testing making this the min version tested and without issues with terraform-docs.
- terraform-docs - Used to generate the Inputs and Outputs sections
- Install with
brew install terraform-docs
- Manually use via pre-commit
- Install with
- tflint - Used to lint the Terraform code
- Install with
brew install tflint
- Manually use via pre-commit
- Install with
The makefile contained in this repo is optimized for linux paths and the main purpose is to execute testing for now.
- Create all tests:
$ make tests
- Clean all tests:
$ make clean