diff --git a/aws_iam_policy_document.tf b/aws_iam_policy_document.tf index a42a37c..0996e7f 100644 --- a/aws_iam_policy_document.tf +++ b/aws_iam_policy_document.tf @@ -1,9 +1,9 @@ locals { actual_iam_policy_documents = { - for rule in var.raw_event_bridge_rules : length(rule.iam_policy_statements) == 0 ? null : + for rule in var.raw_event_bridge_rules : rule.suffix => { statements = rule.iam_policy_statements - } + } if length(rule.iam_policy_statements) > 0 } }