Last active
June 12, 2020 03:26
-
-
Save magickatt/4529c25063c3a71750c321fd61cc5fda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
project_ids = [123456789012, 234567890123, 345678901234] | |
} | |
# Allow every other project access to GCE VM images in a central project | |
resource "google_project_iam_member" "image_user" { | |
for_each = local.project_ids | |
project = "tools-275721" | |
role = "roles/compute.imageUser" | |
member = "serviceAccount:${each.value}@cloudservices.gserviceaccount.com" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment