From 1a460782e35985b1ee9614bf2de01328f1c23fd3 Mon Sep 17 00:00:00 2001 From: Renato Rudnicki Date: Thu, 11 Jul 2024 12:22:39 -0300 Subject: [PATCH] fix for_each for artifact_registry_iam_member --- .../ml_business_unit/development/main.tf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/machine-learning-pipeline/ml_business_unit/development/main.tf b/examples/machine-learning-pipeline/ml_business_unit/development/main.tf index 98631aa..1994019 100644 --- a/examples/machine-learning-pipeline/ml_business_unit/development/main.tf +++ b/examples/machine-learning-pipeline/ml_business_unit/development/main.tf @@ -19,16 +19,16 @@ data "google_project" "project" { } resource "google_artifact_registry_repository_iam_member" "member" { - for_each = toset([ - "serviceAccount:service-${data.google_project.project.number}@gcp-sa-aiplatform-cc.iam.gserviceaccount.com", - google_service_account.vertex_sa.member - ]) + for_each = { + "aiplatform-sa" = "serviceAccount:service-${data.google_project.project.number}@gcp-sa-aiplatform-cc.iam.gserviceaccount.com", + "vertex-sa" = google_service_account.vertex_sa.member, + } project = local.common_artifacts_project_id location = var.instance_region repository = var.repository_id role = "roles/artifactregistry.reader" - member = each.key + member = each.value } resource "google_service_account" "dataflow_sa" {