Skip to content

Commit

Permalink
Merge pull request #14 from silinternational/log-retention
Browse files Browse the repository at this point in the history
Release 0.8.0 -- add input log_retention_in_days
  • Loading branch information
briskt authored Aug 27, 2024
2 parents 1cfbc6a + a00aaab commit a0a20b2
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
asg_tags = {
foo = "bar",
}
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 a0a20b2

Please sign in to comment.