From b8e2a1483434cef2026b7a79278fab704af085e2 Mon Sep 17 00:00:00 2001 From: Benjamin Clark Date: Fri, 13 Sep 2024 16:22:57 +0100 Subject: [PATCH] Change key generation for iam statements --- aws_iam_policy_document.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 } }