Creates metric alarms for use with a ECS Service
- CPU Threshold
- Memory Threshold
module "ecs_metric_alarms" {
source = "dod-iac/ecs-metric-alarms/aws"
name = var.application
actions_alarm = [var.sns_topic_arn]
actions_ok = [var.sns_topic_arn]
actions_insufficient_data = [var.sns_topic_arn]
tags = {
Application = var.application
Environment = var.environment
Automation = "Terraform"
}
}
Terraform 0.13. Pin module version to ~> 1.0.0 . Submit pull-requests to master branch.
Terraform 0.11 and 0.12 are not supported.
This project constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. However, because the project utilizes code licensed from contributors and other third parties, it therefore is licensed under the MIT License. See LICENSE file for more information.
Name | Version |
---|---|
terraform | >= 0.13 |
aws | ~> 3.0 |
Name | Version |
---|---|
aws | ~> 3.0 |
No modules.
Name | Type |
---|---|
aws_cloudwatch_metric_alarm.cpu | resource |
aws_cloudwatch_metric_alarm.mem | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
actions_alarm | List of alarm actions to take | list(string) |
[] |
no |
actions_enabled | Enable the actions. Set to false to temporarily disable actions. | bool |
true |
no |
actions_insufficient_data | List of insufficient data actions to take | list(string) |
[] |
no |
actions_ok | List of ok actions to take | list(string) |
[] |
no |
ecs_cluster_name | The ECS Cluster name for use with CloudWatch Metrics. | string |
n/a | yes |
ecs_service_name | The ECS Service name for use with CloudWatch Metrics. | string |
n/a | yes |
enable_metric_alarm | Enable the metric alarm | bool |
true |
no |
name | The service name. | string |
n/a | yes |
tags | Tags applied to the metric alarms. | map(string) |
{} |
no |
threshold_cpu | The threshold for the cpu metric alarm | string |
"80.0" |
no |
threshold_mem | The threshold for the mem metric alarm | string |
"80.0" |
no |
Name | Description |
---|---|
cpu_metric_alarm_arn | The ARN of the cpu metric alarm |
cpu_metric_alarm_id | The ID of the cpu metric alarm |
mem_metric_alarm_arn | The ARN of the mem metric alarm |
mem_metric_alarm_id | The ID of the mem metric alarm |