From 13bd93794f9bd4cd29ccf4aecb7bd1bd330c9965 Mon Sep 17 00:00:00 2001 From: Liam Nesteroff <35284740+lnesteroff@users.noreply.github.com> Date: Fri, 20 Sep 2024 17:03:30 +1000 Subject: [PATCH] Add location for each IAM resource Location field was missing causing an error --- modules/secure-source-manager-instance/iam.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/secure-source-manager-instance/iam.tf b/modules/secure-source-manager-instance/iam.tf index da159aa225..db111bb8f0 100644 --- a/modules/secure-source-manager-instance/iam.tf +++ b/modules/secure-source-manager-instance/iam.tf @@ -34,6 +34,7 @@ locals { resource "google_secure_source_manager_instance_iam_binding" "authoritative" { for_each = var.iam project = google_secure_source_manager_instance.instance.project + location = google_secure_source_manager_instance.instance.location instance_id = google_secure_source_manager_instance.instance.instance_id role = each.key members = each.value @@ -42,6 +43,7 @@ resource "google_secure_source_manager_instance_iam_binding" "authoritative" { resource "google_secure_source_manager_instance_iam_binding" "bindings" { for_each = var.iam_bindings project = google_secure_source_manager_instance.instance.project + location = google_secure_source_manager_instance.instance.location instance_id = google_secure_source_manager_instance.instance.instance_id role = each.value.role members = each.value.members @@ -50,6 +52,7 @@ resource "google_secure_source_manager_instance_iam_binding" "bindings" { resource "google_secure_source_manager_instance_iam_member" "bindings" { for_each = var.iam_bindings_additive project = google_secure_source_manager_instance.instance.project + location = google_secure_source_manager_instance.instance.location instance_id = google_secure_source_manager_instance.instance.instance_id role = each.value.role member = each.value.member @@ -58,6 +61,7 @@ resource "google_secure_source_manager_instance_iam_member" "bindings" { resource "google_secure_source_manager_repository_iam_binding" "authoritative" { for_each = local.repository_iam project = google_secure_source_manager_repository.repositories[each.value.repository].project + location = google_secure_source_manager_repository.repositories[each.value.repository].location repository_id = google_secure_source_manager_repository.repositories[each.value.repository].repository_id role = each.value.role members = each.value.members @@ -66,6 +70,7 @@ resource "google_secure_source_manager_repository_iam_binding" "authoritative" { resource "google_secure_source_manager_repository_iam_binding" "bindings" { for_each = local.repository_iam_bindings project = google_secure_source_manager_repository.repositories[each.value.repository].project + location = google_secure_source_manager_repository.repositories[each.value.repository].location repository_id = google_secure_source_manager_repository.repositories[each.value.repository].repository_id role = each.value.role members = each.value.members @@ -74,6 +79,7 @@ resource "google_secure_source_manager_repository_iam_binding" "bindings" { resource "google_secure_source_manager_repository_iam_member" "bindings" { for_each = local.repository_iam_bindings_additive project = google_secure_source_manager_repository.repositories[each.value.repository].project + location = google_secure_source_manager_repository.repositories[each.value.repository].location repository_id = google_secure_source_manager_repository.repositories[each.value.repository].repository_id role = each.value.role member = each.value.member