Skip to content

Commit

Permalink
fix(): target does not check correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
angle319 committed Jul 24, 2023
1 parent abefc74 commit 1d9f095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ resource "aws_cloudwatch_log_group" "customize_naming" {
resource "aws_ecs_task_definition" "this" {
family = "${local.alias}-task"
container_definitions = local.is_log == false ? jsonencode(
[for x in var.task_def : merge(x, { logConfiguration = { for k, v in lookup(x, "logConfiguration", null) : k => v if k != var.auto_generate_cw_group_key } }) if try(x["logConfiguration"]["cloudwatchGroupName"], null) != null]
[for x in var.task_def : merge(x, { logConfiguration = { for k, v in lookup(x, "logConfiguration", null) : k => v if k != var.auto_generate_cw_group_key } }) if try(x["logConfiguration"], null) != null]
) : jsonencode([for x in var.task_def : merge(x, { logConfiguration = {
logDriver = "awslogs"
options = {
Expand Down

0 comments on commit 1d9f095

Please sign in to comment.