Created
February 28, 2019 17:53
-
-
Save 100daysofdevops/f486573541363627146b7e8fe55ddf0b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resource "aws_sns_topic" "alarm" { | |
| name = "alarms-topic" | |
| delivery_policy = <<EOF | |
| { | |
| "http": { | |
| "defaultHealthyRetryPolicy": { | |
| "minDelayTarget": 20, | |
| "maxDelayTarget": 20, | |
| "numRetries": 3, | |
| "numMaxDelayRetries": 0, | |
| "numNoDelayRetries": 0, | |
| "numMinDelayRetries": 0, | |
| "backoffFunction": "linear" | |
| }, | |
| "disableSubscriptionOverrides": false, | |
| "defaultThrottlePolicy": { | |
| "maxReceivesPerSecond": 1 | |
| } | |
| } | |
| } | |
| EOF | |
| provisioner "local-exec" { | |
| command = "aws sns subscribe --topic-arn ${self.arn} --protocol email --notification-endpoint ${var.alarms_email}" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment