Browse the Repo

file-type-icon.circleci
file-type-icon.github
file-type-iconexamples
file-type-iconmodules
file-type-iconkinesis
file-type-iconmsk
file-type-iconsns-sqs-connection
file-type-iconsns
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf
file-type-iconsqs-lambda-connection
file-type-iconsqs
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...

Browse the Repo

file-type-icon.circleci
file-type-icon.github
file-type-iconexamples
file-type-iconmodules
file-type-iconkinesis
file-type-iconmsk
file-type-iconsns-sqs-connection
file-type-iconsns
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvariables.tf
file-type-iconsqs-lambda-connection
file-type-iconsqs
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconLICENSE.txt
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...
SNS

SNS

Create SNS topics with configurable IAM and delivery policies.

Code Preview

Preview the Code

mobile file icon

README.md

down

Simple Notification Service (SNS) Topic Module

This module makes it easy to deploy a SNS topic along with the publisher and subscriber policies for the topic.

How do you use this module?

  • See the root README for instructions on using Terraform modules.
  • See the examples folder for example usage.
  • See variables.tf for all the variables you can set on this module.

Here is an example of how you might deploy an SNS topic with this module:

module "sns" {
  source = "git::git@github.com:gruntwork-io/terraform-aws-messaging.git//modules/sns?ref=vx.y.z"

  name         = "my-topic"
  display_name = "my-display"
  allow_publish_accounts = [
    "arn:aws:iam::123456789012:user/Bill",
    "arn:aws:iam::123456789012:user/Ted"
  ]

  allow_subscribe_accounts = [
    "arn:aws:iam::123456789012:user/AbeLincoln"
  ]

  allow_subscribe_protocols = [
    "https"
  ]

  allow_publish_services = [
    "events.amazonaws.com",
    "rds.amazonaws.com"
  ]
}

How do I access the SNS topic?

This module includes several Terraform outputs, including:

  1. topic_name: The Name of the created topic
  2. topic_display_name: The Display Name of the created topic
  3. topic_arn: The ARN of the created topic
  4. topic_policy: The Access policy of the created topic

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?