Skip to content

wearetechnative/terraform-aws-sns

Repository files navigation

Terraform AWS [SNS]

This module implements a simple SNS topic with all known AWS best practices enforced.

How does it work

First use after you clone this repository or when .pre-commit-config.yaml is updated

Run pre-commit install to install any guardrails implemented using pre-commit.

See pre-commit installation on how to install pre-commit.

Usage

The simplest way to use this module is by defining the least required defaults:

module "sns_topic_example" {
   source = "[email protected]:TechNative-B-V/terraform-aws-module-sns.git?ref=f910b2174690733ed11bdb992521c9ea2358c6f2"

   name = "sns_topic_example"
   kms_key_arn = module.kms.kms_key_arn
}

Providers

Name Version
aws >=4.21.0

Modules

No modules.

Resources

Name Type
aws_sns_topic.this resource
aws_sns_topic_policy.this resource
aws_caller_identity.current data source
aws_iam_policy_document.combined data source
aws_iam_policy_document.this data source

Inputs

Name Description Type Default Required
kms_key_arn KMS key to use for encrypting SNS topics. If not provided then alias/aws/sns is used as a default. Set to null to dsiable entire (not recommended!). string "alias/aws/sns" no
name Unique name to assign to SNS topic. string n/a yes
policy_allowed Required policy for SNS topic.
map(object({
principal = object({
type = string
identities = list(string)
})
actions = list(string)
}))
{} no

Outputs

Name Description
sns_arn n/a

About

AWS SNS module based on currently known best practices

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages