diff --git a/main.tf b/main.tf index 1270098..55b4248 100644 --- a/main.tf +++ b/main.tf @@ -91,7 +91,7 @@ resource "aws_cloudwatch_event_rule" "this" { event_pattern = lookup(each.value, "event_pattern", null) schedule_expression = lookup(each.value, "schedule_expression", null) role_arn = lookup(each.value, "role_arn", false) ? aws_iam_role.eventbridge[0].arn : null - state = try(each.value.enabled ? "ENABLED" : "DISABLED", tobool(each.value.state) ? "ENABLED" : "DISABLED", upper(each.value.state), "DISABLED") + state = try(each.value.enabled ? "ENABLED" : "DISABLED", tobool(each.value.state) ? "ENABLED" : "DISABLED", upper(each.value.state), null) tags = merge(var.tags, { Name = each.value.Name