In the code example cluster does not have container insights enabled
resource "aws_ecs_cluster" "insecure_example" {
name = "services-cluster"
}
Cloudwatch Container Insights provide more metrics and logs for container based applications and micro services. Not all metrics and logs may be gathered for containers when Container Insights isn't enabled.
Enable Container Insights
resource "aws_ecs_cluster" "secure_example" {
name = "services-cluster"
setting {
name = "containerInsights"
value = "enabled"
}
}