Skip to content

Commit

Permalink
fix: true or false result expressions must have consistent types
Browse files Browse the repository at this point in the history
  • Loading branch information
uyggnodoow committed Jun 24, 2023
1 parent 9fd1a1e commit 353651c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,25 @@ resource "aws_cloudtrail" "this" {
# }

dynamic "advanced_event_selector" {
for_each = var.advanced_event_selector == null ? [] : var.advanced_event_selector
for_each = var.advanced_event_selector == null ? null : var.advanced_event_selector
iterator = advanced_event_selector

content {
name = lookup(advanced_event_selector.value, "name")

dynamic "field_selector" {
for_each = lookup(advanced_event_selector.value, "field_selector") == null ? [] : lookup(advanced_event_selector.value, "field_selector")
for_each = lookup(advanced_event_selector.value, "field_selector", null) == null ? null : lookup(advanced_event_selector.value, "field_selector")
iterator = field_selector

content {
field = lookup(field_selector.value, "field")

ends_with = lookup(field_selector.value, "ends_with", null) != null ? lookup(field_selector.value, "ends_with") : null
equals = lookup(field_selector.value, "equals", null) != null ? lookup(field_selector.value, "equals") : null
not_ends_with = lookup(field_selector.value, "not_ends_with", null) != null ? lookup(field_selector.value, "not_ends_with") : null
not_equals = lookup(field_selector.value, "not_equals", null) != null ? lookup(field_selector.value, "not_equals") : null
not_starts_with = lookup(field_selector.value, "not_starts_with", null) != null ? lookup(field_selector.value, "not_starts_with") : null
starts_with = lookup(field_selector.value, "starts_with", null) != null ? lookup(field_selector.value, "starts_with") : null
ends_with = lookup(field_selector.value, "ends_with", null) == null ? null : lookup(field_selector.value, "ends_with")
equals = lookup(field_selector.value, "equals", null) == null ? null : lookup(field_selector.value, "equals")
not_ends_with = lookup(field_selector.value, "not_ends_with", null) == null ? null : lookup(field_selector.value, "not_ends_with")
not_equals = lookup(field_selector.value, "not_equals", null) == null ? null : lookup(field_selector.value, "not_equals")
not_starts_with = lookup(field_selector.value, "not_starts_with", null) == null ? null : lookup(field_selector.value, "not_starts_with")
starts_with = lookup(field_selector.value, "starts_with", null) == null ? null : lookup(field_selector.value, "starts_with")
}
}
}
Expand Down

0 comments on commit 353651c

Please sign in to comment.