Skip to content

Commit ed4b013

Browse files
authoredApr 24, 2024··
fix: Default to null when state argument is not set (#122)
1 parent 2f64989 commit ed4b013

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ resource "aws_cloudwatch_event_rule" "this" {
9191
event_pattern = lookup(each.value, "event_pattern", null)
9292
schedule_expression = lookup(each.value, "schedule_expression", null)
9393
role_arn = lookup(each.value, "role_arn", false) ? aws_iam_role.eventbridge[0].arn : null
94-
state = try(each.value.enabled ? "ENABLED" : "DISABLED", tobool(each.value.state) ? "ENABLED" : "DISABLED", upper(each.value.state), "DISABLED")
94+
state = try(each.value.enabled ? "ENABLED" : "DISABLED", tobool(each.value.state) ? "ENABLED" : "DISABLED", upper(each.value.state), null)
9595

9696
tags = merge(var.tags, {
9797
Name = each.value.Name

0 commit comments

Comments
 (0)
Please sign in to comment.