Skip to content

Commit

Permalink
fix: Default to null when state argument is not set (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcnyholm committed Apr 24, 2024
1 parent 2f64989 commit ed4b013
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 @@ -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
Expand Down

0 comments on commit ed4b013

Please sign in to comment.