Skip to content

Commit

Permalink
don't create log group if name was provided (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
harryherbig authored Jul 23, 2024
1 parent 9e1a357 commit 1b25c91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cloudwatch_logs.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "aws_cloudwatch_log_group" "containers" {
count = var.cloudwatch_logs.enabled ? 1 : 0
count = var.cloudwatch_logs.enabled && var.cloudwatch_logs.name != "" ? 1 : 0

name = var.cloudwatch_logs.name == "" ? "/aws/ecs/${var.service_name}" : var.cloudwatch_logs.name
retention_in_days = var.cloudwatch_logs.retention_in_days
Expand Down

0 comments on commit 1b25c91

Please sign in to comment.