Skip to content

Commit

Permalink
add cloudwatch log retention period (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenarciso4 authored Feb 13, 2024
1 parent b236e17 commit 4c8c335
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions terraform/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Cloudwatch logs
#
resource "aws_cloudwatch_log_group" "cluster" {
name = "${var.cluster_name}-${var.aws_env}"
kms_key_id = var.cloudwatch_log_group_kms_arn
name = "${var.cluster_name}-${var.aws_env}"
kms_key_id = var.cloudwatch_log_group_kms_arn
retention_in_days = var.cloudwatch_log_retention_period
}

6 changes: 6 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,13 @@ variable "metadata_options_http_tokens" {
default = ""
}

# cloudwatch variables
variable "cloudwatch_log_group_kms_arn" {
description = "cloudwatch log group kms arn"
default = ""
}

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

0 comments on commit 4c8c335

Please sign in to comment.