ECS clusters should have the containerInsights setting enabled to provide enhanced monitoring and observability for container workloads. Without enabling container insights, as in the configuration below, critical metrics and logs about cluster and task performance will not be collected, making it more difficult to detect anomalies, troubleshoot issues, and ensure operational health:
resource "aws_ecs_cluster" "foo" {
name = "white-hart"
}
Enabling container insights by specifying the following helps provide visibility into resource utilization, failures, and capacity planning, reducing operational risk:
setting {
name = "containerInsights"
value = "enabled"
}