Skip to content

Commit

Permalink
add input log_retention_in_days
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Aug 27, 2024
1 parent 9727498 commit 25e17da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ resource "aws_iam_user_policy" "cd" {
*/
resource "aws_cloudwatch_log_group" "logs" {
name = local.app_name_and_env
retention_in_days = 30
retention_in_days = var.log_retention_in_days
}

/*
Expand Down
1 change: 1 addition & 0 deletions test/test.tf
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ module "full" {
timeout = 10
unhealthy_threshold = 3
}
log_retention_in_days = 60
}

provider "aws" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ variable "create_dashboard" {
type = bool
}

variable "log_retention_in_days" {
description = "Number of days to retain CloudWatch application logs"
default = 30
type = number
}


/*
* DNS configuration
Expand Down

0 comments on commit 25e17da

Please sign in to comment.