Created
February 11, 2018 19:08
-
-
Save downspot/9516dee74cdb82b0268dce4411fbf074 to your computer and use it in GitHub Desktop.
aws_cloudwatch_metric_alarm recover
This file contains 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_cloudwatch_metric_alarm" "example_host_alarm" { | |
alarm_name = "${aws_instance.example_host_alarm.id}" | |
comparison_operator = "GreaterThanOrEqualToThreshold" | |
evaluation_periods = "2" | |
metric_name = "StatusCheckFailed_System" | |
namespace = "AWS/EC2" | |
period = "60" | |
statistic = "Maximum" | |
threshold = "1.0" | |
alarm_description = "Created from EC2 Console" | |
alarm_actions = ["arn:aws:automate:us-east-1:ec2:recover"] | |
dimensions { | |
InstanceId = "${aws_instance.example_host_alarm.id}" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment