Created
April 14, 2017 01:18
-
-
Save KensoDev/00daa176caf0816335bf801271753c5f to your computer and use it in GitHub Desktop.
Cluster notification terraform
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
/* | |
Read more about event patterns here: | |
http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/CloudWatchEventsandEventPatterns.html | |
*/ | |
data "template_file" "event_pattern" { | |
template = "${file("${path.module}/files/deploy-notification.json.tpl")}" | |
vars = { | |
cluster_arn = "${aws_ecs_cluster.ecs.id}" | |
} | |
} | |
resource "aws_cloudwatch_event_rule" "failed-deploy" { | |
name = "failed-deploy-${var.name}-${var.environment}" | |
description = "Deploy failure notificatioon ${var.name}-${var.environment}" | |
event_pattern = "${data.template_file.event_pattern.rendered}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment