Skip to content

Commit

Permalink
add cloudwatch log retention period (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenarciso4 authored Feb 23, 2024
1 parent 8c7ff00 commit 49f679b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion terraform/ecs-upgrade.tf
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ EOF

# cloudwatch log group
resource "aws_cloudwatch_log_group" "ecs-upgrade" {
name = "ecs-upgrade"
name = "ecs-upgrade"
retention_in_days = var.cloudwatch_log_retention_period
}
# scheduling
resource "aws_cloudwatch_event_rule" "ecs-upgrade" {
Expand Down
5 changes: 5 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,8 @@ variable "EGRESS_CIDR" {
variable "ASSIGN_PUBLIC_IP" {
default = false
}

variable "cloudwatch_log_retention_period" {
description = "cloudwatch retention period in days"
default = "0"
}

0 comments on commit 49f679b

Please sign in to comment.