Removing iam_roles from multiple modules

This commits removes the iam_roles variables from the modules:
 - artifact-registry
 - bigtable-instance
 - cloud-function
 - container-registry
 - endopoints
 - pubsub
 - source-repository
This commit is contained in:
Julio Castillo
2020-10-30 18:55:54 +01:00
parent 96dba2256e
commit 82a1fe3c20
22 changed files with 51 additions and 133 deletions

View File

@@ -20,8 +20,8 @@ resource "google_container_registry" "registry" {
}
resource "google_storage_bucket_iam_binding" "bindings" {
for_each = toset(var.iam_roles)
for_each = var.iam_members
bucket = google_container_registry.registry.id
role = each.value
members = lookup(var.iam_members, each.value, [])
role = each.key
members = each.value
}