Skip to content

Repository files navigation

sns-notifications

Terraform module that creates an SNS topic and forwards messages to webhooks via Lambda

Development

make init   # run once after cloning
make readme # regenerate README.md
make lint   # lint terraform code

Usage

module "sns_notifications" {
  source = "git@gitlab.miquido.com:miquido/terraform/sns-notifications.git"

  environment = "production"
  project     = "my-project"
  webhooks    = ["https://hooks.example.com/my-webhook"]

  tags = {
    Environment = "production"
    Project     = "my-project"
  }
}

Requirements

Name Version
terraform >= 1.5
aws >= 6.0.0

Providers

Name Version
archive 2.8.0
aws 6.60.0

Modules

Name Source Version
default_formatter git::https://github.com/miquido/terraform-default-sns-formatter.git tags/v1.1.0

Resources

Name Type
aws_cloudwatch_log_group.notification resource
aws_iam_role.notification resource
aws_iam_role_policy.notification resource
aws_lambda_function.notification resource
aws_lambda_permission.sns resource
aws_sns_topic.main resource
aws_sns_topic_policy.alarm resource
aws_sns_topic_subscription.lambda_subscription resource
aws_ssm_parameter.webhooks resource

Inputs

Name Description Type Default Required
additional_message_formatter_lambdas List of additional AWS Lambdas to format the message list(string) [] no
default_message_formatters List of included default message formatters list(string) null no
environment Environment name any n/a yes
log_retention How long to keep logs number 7 no
project Project name any n/a yes
tags Default tags to apply on all created resources map(string) {} no
webhooks List of webhooks to call when SNS message is received list(string) [] no

Outputs

Name Description
sns_arn arn of the webhook connected sns topic

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages