Ce produit n'est pas pris en charge par le site Datadog que vous avez sélectionné. ().
Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Metadata

Id: terraform-aws-ecs-cluster-container-insights-disabled

Provider: AWS

Platform: Terraform

Severity: Low

Category: Observability

Learn More

Description

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"
}

Compliant Code Examples

resource "aws_ecs_cluster" "foo" {
  name = "white-hart"

  setting {
    name  = "containerInsights"
    value = "enabled"
  }
}
resource "aws_ecs_cluster" "bar" {
  name = "white-hart2"

  setting {
    name  = "containerInsights"
    value = "enhanced"
  }
}

Non-Compliant Code Examples

resource "aws_ecs_cluster" "foo" {
  name = "white-hart"

#  setting {
#    name  = "containerInsights"
#    value = "enabled"
#  }
}