This terraform module will deploy the following services:
- CloudWatch Alarm
module "ec2_system_health_check" {
source = "github.com/terrablocks/aws-ec2-health-check.git"
alarm_name = "web-server-system-health-check"
instance_id = "i-xxxxxxxx"
}
module "ec2_instance_health_check" {
source = "github.com/terrablocks/aws-ec2-health-check.git"
alarm_type = "instance"
alarm_name = "web-server-instance-health-check"
instance_id = "i-xxxxxxxx"
}
Name | Version |
---|---|
terraform | >= 0.13 |
aws | >= 3.37.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
alarm_type | Type of EC2 health alarm to create. Possible Values: system or instance | string |
"system" |
no |
alarm_name | Name of cloudwatch alarm | string |
n/a | yes |
instance_id | ID of EC2 instance which needs to be monitored | string |
n/a | yes |
period | The period in seconds over which the result is based on | string |
"60" |
no |
description | The description for the alarm | string |
"This alarms monitors ec2 instance system health check" |
no |
alarm_actions | List of ARNs pointing to specific actions that should be invoked when a threshold is breached. Refer PutMetricAlarm API for action ARN. Note: Default action will be set to recover for system health check alarm and reboot for instance health check alarm | list(string) |
[] |
no |
insufficient_data_actions | List of ARNs pointing to specific actions that should be invoked when an alarm is in Insufficient Data status |
list(string) |
[] |
no |
tags | Map of key-value pair to associate with alarm | map(string) |
{} |
no |
Name | Description |
---|---|
alarm_name | Name of alarm created |
alarm_arn | ARN of alarm created |