Skip to content

Commit

Permalink
Allow adjusting log retention on cron monitoring lambda logs
Browse files Browse the repository at this point in the history
  • Loading branch information
rfairburn committed Mar 14, 2024
1 parent ee50173 commit e7e495a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion terraform/addons/monitoring/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ data "aws_iam_policy_document" "cron_monitoring_lambda" {
resource "aws_cloudwatch_log_group" "cron_monitoring_lambda" {
count = var.cron_monitoring == null ? 0 : 1
name = "/aws/lambda/${var.customer_prefix}-cron-monitoring"
retention_in_days = 7
retention_in_days = var.cron_monitoring.log_retention_in_days

}

Expand Down
3 changes: 2 additions & 1 deletion terraform/addons/monitoring/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ variable "cron_monitoring" {
subnet_ids = list(string)
rds_security_group_id = string
delay_tolerance = string
run_interval = string
run_interval = string
log_retention_in_days = optional(number, 7)
})
default = null
}

0 comments on commit e7e495a

Please sign in to comment.