From 41ea8df2b54724a2b11ab6496ff243d802ddc427 Mon Sep 17 00:00:00 2001 From: abhikaddy <47179661+abhikaddy@users.noreply.github.com> Date: Tue, 3 Oct 2023 14:37:58 +0530 Subject: [PATCH] fix: activate_api_identities throwing error that email can't be null #751 --- modules/project_services/main.tf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/project_services/main.tf b/modules/project_services/main.tf index d7edf9b3..a4ec8240 100644 --- a/modules/project_services/main.tf +++ b/modules/project_services/main.tf @@ -77,8 +77,9 @@ locals { } resource "google_project_iam_member" "project_service_identity_roles" { - for_each = local.add_service_roles - + for_each = { + for k, v in local.add_service_roles : k => v if v.email != null + } project = var.project_id role = each.value.role member = "serviceAccount:${each.value.email}"