From 0f3e5c48fc16e9354d36dd49d4108908aee141fc Mon Sep 17 00:00:00 2001 From: Ben Galewsky Date: Wed, 20 Dec 2023 15:48:47 -0600 Subject: [PATCH] ...and get dev working again too --- infra/mdf/dev/main.tf | 2 ++ infra/mdf/dev/variables.tf | 9 +++++++++ infra/mdf/modules/lambdas/main.tf | 8 ++++---- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/infra/mdf/dev/main.tf b/infra/mdf/dev/main.tf index 43c020a..7b9825b 100644 --- a/infra/mdf/dev/main.tf +++ b/infra/mdf/dev/main.tf @@ -36,6 +36,8 @@ module "lambdas" { namespace = var.namespace lambda_execution_role_arn = module.permissions.submit_lambda_invoke_arn ecr_repos = var.ecr_repos + resource_tags = var.resource_tags + } module "dynamodb" { diff --git a/infra/mdf/dev/variables.tf b/infra/mdf/dev/variables.tf index 5867565..c59d4e6 100644 --- a/infra/mdf/dev/variables.tf +++ b/infra/mdf/dev/variables.tf @@ -47,4 +47,13 @@ variable "ecr_repos" { "status" = "557062710055.dkr.ecr.us-east-1.amazonaws.com/mdf-lambdas/status" "auth" = "557062710055.dkr.ecr.us-east-1.amazonaws.com/mdf-lambdas/auth" } +} + +variable "resource_tags" { + type = map(string) + default = { + "Owner" = "MDF" + "Environment" = "Development" + "Project" = "MDF Connect" + } } \ No newline at end of file diff --git a/infra/mdf/modules/lambdas/main.tf b/infra/mdf/modules/lambdas/main.tf index 7178d2e..f42f25e 100644 --- a/infra/mdf/modules/lambdas/main.tf +++ b/infra/mdf/modules/lambdas/main.tf @@ -27,7 +27,7 @@ resource "aws_lambda_function" "mdf-connect-auth" { resource "aws_cloudwatch_log_group" "auth_log_group" { - name = "/aws/lambda/${local.auth_function_name}" + name = "/aws/lambda/${local.auth_function_name}-${var.env}" retention_in_days = 5 tags = var.resource_tags } @@ -48,7 +48,7 @@ resource "aws_lambda_function" "mdf-connect-submit" { } resource "aws_cloudwatch_log_group" "submit_log_group" { - name = "/aws/lambda/${local.submit_function_name}" + name = "/aws/lambda/${local.submit_function_name}-${var.env}" retention_in_days = 5 tags = var.resource_tags } @@ -69,7 +69,7 @@ resource "aws_lambda_function" "mdf-connect-status" { } resource "aws_cloudwatch_log_group" "status_log_group" { - name = "/aws/lambda/${local.status_function_name}" + name = "/aws/lambda/${local.status_function_name}-${var.env}" retention_in_days = 5 tags = var.resource_tags } @@ -92,7 +92,7 @@ resource "aws_lambda_function" "mdf-connect-submissions" { } resource "aws_cloudwatch_log_group" "submissions_log_group" { - name = "/aws/lambda/${local.submissions_function_name}" + name = "/aws/lambda/${local.submissions_function_name}--${var.env}" retention_in_days = 5 tags = var.resource_tags }