From a70033249e0391200c71e79baceceb67fbf0a4b7 Mon Sep 17 00:00:00 2001 From: Andrew Pearce Date: Mon, 11 Mar 2024 09:54:33 +0000 Subject: [PATCH] MLPAB-1991 - Fix AV Scan lambda function logging (#1100) * use log group for lambda function * put all logs into a folder named for the environment --- .../application_logs/cloudwatch_log_group.tf | 2 +- .../environment/region/modules/lambda/main.tf | 2 +- .../region/modules/s3_antivirus/README.md | 1 + .../region/modules/s3_antivirus/iam.tf | 12 ++++++++++++ .../region/modules/s3_antivirus/main.tf | 17 +++++++++++++++++ 5 files changed, 32 insertions(+), 2 deletions(-) diff --git a/terraform/environment/region/modules/application_logs/cloudwatch_log_group.tf b/terraform/environment/region/modules/application_logs/cloudwatch_log_group.tf index 63b4738301..c05b9f5264 100644 --- a/terraform/environment/region/modules/application_logs/cloudwatch_log_group.tf +++ b/terraform/environment/region/modules/application_logs/cloudwatch_log_group.tf @@ -10,7 +10,7 @@ resource "aws_cloudwatch_log_group" "application_logs" { provider = aws.region } resource "aws_cloudwatch_query_definition" "app_container_messages" { - name = "Modernising LPA Application Logs/${data.aws_default_tags.current.tags.environment-name} app container messages" + name = "${data.aws_default_tags.current.tags.environment-name}/app container messages" log_group_names = [aws_cloudwatch_log_group.application_logs.name] query_string = <