}
alarm_actions = ["${aws_sns_topic.management-alerts.arn}"]
}
+
+resource "aws_cloudwatch_metric_alarm" "unhealthy" {
+ alarm_name = "UnhealthyHostCount"
+ alarm_description = "Alert when any ELB has unhealthy hosts."
+ metric_name = "UnHealthyHostCount"
+ comparison_operator = "GreaterThanOrEqualToThreshold"
+ evaluation_periods = 15
+ period = 60
+ namespace = "AWS/ELB"
+ statistic = "Maximum"
+ threshold = 1
+ alarm_actions = ["${aws_sns_topic.management-alerts.arn}"]
+}
\ No newline at end of file
sid = "AWSControl"
actions = [
"autoscaling:*",
+ "cloudwatch:ListMetrics",
+ "cloudwatch:GetMetricStatistics",
+ "cloudwatch:Describe*",
"ec2:*",
"elasticloadbalancing:*",
"iam:PassRole",
- "iam:GetServerCertificate"
+ "iam:GetServerCertificate",
+ "logs:DescribeLogStreams",
+ "logs:PutLogEvents",
]
resources = [
"*"