From 85801bd637ae4dba6578015e73dfbe355d7f0a0e Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Fri, 29 Dec 2023 14:14:02 +0000 Subject: [PATCH] Enable ECS Cluster autoscaling group metrics * Adds the list of enabled metrics for the ECS Cluster's autoscaling group. These are the metrics that are automatically enabled when choosing to enable metrics within the AWS console, which is also the full list of metrics avaiable for the autoscaling group. --- ecs-cluster-infrastructure.tf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/ecs-cluster-infrastructure.tf b/ecs-cluster-infrastructure.tf index 575520f..18302e3 100644 --- a/ecs-cluster-infrastructure.tf +++ b/ecs-cluster-infrastructure.tf @@ -254,6 +254,30 @@ resource "aws_autoscaling_group" "infrastructure_ecs_cluster" { timeouts { delete = "15m" } + + enabled_metrics = [ + "GroupAndWarmPoolDesiredCapacity", + "GroupAndWarmPoolTotalCapacity", + "GroupDesiredCapacity", + "GroupInServiceCapacity", + "GroupInServiceInstances", + "GroupMaxSize", + "GroupMinSize", + "GroupPendingCapacity", + "GroupPendingInstances", + "GroupStandbyCapacity", + "GroupStandbyInstances", + "GroupTerminatingCapacity", + "GroupTerminatingInstances", + "GroupTotalCapacity", + "GroupTotalInstances", + "WarmPoolDesiredCapacity", + "WarmPoolMinSize", + "WarmPoolPendingCapacity", + "WarmPoolTerminatingCapacity", + "WarmPoolTotalCapacity", + "WarmPoolWarmedCapacity", + ] } resource "aws_sns_topic" "infrastructure_ecs_cluster_autoscaling_lifecycle_termination" {