Skip to content

Instantly share code, notes, and snippets.

@DanielDaCosta
Created September 12, 2020 20:49
Show Gist options
  • Select an option

  • Save DanielDaCosta/1b4be29479e5993fd055489d4c41a501 to your computer and use it in GitHub Desktop.

Select an option

Save DanielDaCosta/1b4be29479e5993fd055489d4c41a501 to your computer and use it in GitHub Desktop.
resource "aws_sns_topic" "sns_alarms" {
name = "${local.name_dash}-sns-alarms"
tags = {
Product = local.name_dash
}
}
resource "aws_sns_topic_subscription" "lambda_alarm" {
topic_arn = aws_sns_topic.sns_alarms.arn
protocol = "lambda"
endpoint = "arn:aws:lambda:${var.region}:${data.aws_caller_identity.current.account_id}:function:${local.name_dash}-alarms-discord"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment