From 8440098eb00f6a047485cae7fc475491661387b5 Mon Sep 17 00:00:00 2001 From: Jamie Visker Date: Wed, 30 Jul 2025 13:26:07 -0600 Subject: [PATCH 1/2] Move the default retention for lambda cloudwatch logs from 7 days to 120 days --- README.md | 2 +- variables.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a095259..b2b8866 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ module "lambda_api" { | public_subnet_ids | list(string) | List of subnet IDs for the ALB. | | | tags | map(string) | A map of AWS Tags to attach to each resource created | {} | | role_permissions_boundary_arn | string | IAM Role Permissions Boundary ARN | | -| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 7. | 7 | +| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 120. | 120 | | lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. | [] | | lambda_layers | list(string) | List of Lambda Layer Version ARNs (maximum of 5) to attach to your function. | [] | | timeout | number | How long the lambda will run (in seconds) before timing out | 3 (same as terraform default) | diff --git a/variables.tf b/variables.tf index e333742..4201a82 100644 --- a/variables.tf +++ b/variables.tf @@ -114,8 +114,8 @@ variable "role_permissions_boundary_arn" { variable "log_retention_in_days" { type = number - description = "CloudWatch log group retention in days. Defaults to 7." - default = 7 + description = "CloudWatch log group retention in days. Defaults to 120." + default = 120 } variable "lambda_policies" { From 71d9390170e1ab5eea5128326d02a72abe93d6ed Mon Sep 17 00:00:00 2001 From: Jamie Visker Date: Wed, 30 Jul 2025 13:30:06 -0600 Subject: [PATCH 2/2] update the version --- README.md | 4 ++-- examples/docker-lambda/docker.tf | 2 +- examples/simple-lambda-in-vpc/example.tf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2b8866..43a58d2 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Also Note: CodePipeline and CodeDeploy cannot be used together to deploy a Lambd For a Zip file lambda ```hcl module "lambda_api" { - source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v3.0.1" + source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v4.1.0" app_name = "my-lambda-codedeploy-dev" zip_filename = "./src/lambda.zip" zip_handler = "index.handler" @@ -50,7 +50,7 @@ module "lambda_api" { For a docker image lambda: ```hcl module "lambda_api" { - source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v3.0.1" + source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v4.1.0" app_name = "my-docker-lambda" image_uri = "my-image-from-my-ecr:latest" hosted_zone = module.acs.route53_zone diff --git a/examples/docker-lambda/docker.tf b/examples/docker-lambda/docker.tf index 248b48e..288f7ea 100644 --- a/examples/docker-lambda/docker.tf +++ b/examples/docker-lambda/docker.tf @@ -9,7 +9,7 @@ module "acs" { module "lambda_api" { # source = "../../" - source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v3.0.1" + source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v4.1.0" app_name = "my-docker-lambda" image_uri = "my-image-from-my-ecr:latest" hosted_zone = module.acs.route53_zone diff --git a/examples/simple-lambda-in-vpc/example.tf b/examples/simple-lambda-in-vpc/example.tf index 68c0490..daf6833 100644 --- a/examples/simple-lambda-in-vpc/example.tf +++ b/examples/simple-lambda-in-vpc/example.tf @@ -9,7 +9,7 @@ module "acs" { module "lambda_api" { # source = "../../" - source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v3.0.1" + source = "github.com/byu-oit/terraform-aws-lambda-api?ref=v4.1.0" app_name = "my-lambda-dev" zip_filename = "./src/lambda.zip" zip_handler = "index.handler"