Skip to content

Commit

Permalink
set cloudwatch log group retention
Browse files Browse the repository at this point in the history
  • Loading branch information
troyready committed May 8, 2023
1 parent b612789 commit 41bf222
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- AWS Lambda examples: set default log group retention value

## [0.10.0] - 2023-05-07
### Added
Expand Down
5 changes: 3 additions & 2 deletions src/init/aws_tf_go_lambda/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,9 @@ resource "aws_iam_role" "function_lambda" {
}
resource "aws_cloudwatch_log_group" "function_lambda" {
name = "/aws/lambda/\${local.function_name}"
tags = var.tags
name = "/aws/lambda/\${local.function_name}"
retention_in_days = 365
tags = var.tags
}
resource "aws_lambda_function" "function" {
Expand Down
5 changes: 3 additions & 2 deletions src/init/aws_tf_node_lambda/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,9 @@ resource "aws_iam_role" "hello_world_lambda" {
}
resource "aws_cloudwatch_log_group" "hello_world_function" {
name = "/aws/lambda/\${local.hello_world_function_name}"
tags = var.tags
name = "/aws/lambda/\${local.hello_world_function_name}"
retention_in_days = 365
tags = var.tags
}
resource "aws_lambda_function" "hello_world" {
Expand Down

0 comments on commit 41bf222

Please sign in to comment.