Skip to content

Commit

Permalink
fix for_each for artifact_registry_iam_member
Browse files Browse the repository at this point in the history
  • Loading branch information
renato-rudnicki committed Jul 11, 2024
1 parent 393756f commit 1a46078
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 1a46078

Please sign in to comment.