Code Monkey home page Code Monkey logo

terraform-aws-sns's Introduction

License Latest Release Build Status Build Status Build Status Build Status Build Status Build Status Build Status

AWS SNS Terraform module

Description

This terraform module creates sns topic and associated resources.

Examples available here

Usage

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"
  }
}

Documentation

Amazon SNS Documentation

Terraform provider documentation

Requirements

Name Version
terraform >= 0.14.11
aws >= 4.0.0

Providers

Name Version
aws 4.63.0

Modules

No modules.

Resources

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

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 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

Outputs

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.

Third party software

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
  • 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
  • tflint - Used to lint the Terraform code
    • Install with brew install tflint
    • Manually use via pre-commit

Makefile

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

BOLDLink-SIG 2022

terraform-aws-sns's People

Contributors

patrickmukumbu avatar boldlinksig avatar ndegwajohn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.