From b8fe3f5ce6250cf4c6fbe81657a430169e064d5f Mon Sep 17 00:00:00 2001 From: Jerome Wolff Date: Thu, 28 Sep 2023 10:21:53 +0200 Subject: [PATCH] Add containerInsights log group --- README.md | 1 + main.tf | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 2c03494..71ddc4f 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ performance and health. ## Resources +- resource.aws_cloudwatch_log_group.container_insights (main.tf#62) - resource.aws_cloudwatch_log_group.main (main.tf#55) - resource.aws_ecs_cluster.main (main.tf#10) diff --git a/main.tf b/main.tf index 2e6accf..f3049e5 100644 --- a/main.tf +++ b/main.tf @@ -58,3 +58,12 @@ resource "aws_cloudwatch_log_group" "main" { name = "/ecs/cluster/${var.name}/ssm-logs" tags = var.tags } + +resource "aws_cloudwatch_log_group" "container_insights" { + count = var.enable_container_insights ? 1 : 0 + + name = "/aws/ecs/containerinsights/${var.name}/performance" + retention_in_days = 1 + + tags = var.tags +}