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:
@@ -14,12 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
locals {
|
||||
iam_roles_bindings = {
|
||||
for k in var.iam_roles : k => lookup(var.iam_members, k, [])
|
||||
}
|
||||
}
|
||||
|
||||
resource "google_endpoints_service" "default" {
|
||||
project = var.project_id
|
||||
service_name = var.service_name
|
||||
@@ -29,8 +23,8 @@ resource "google_endpoints_service" "default" {
|
||||
}
|
||||
|
||||
resource "google_endpoints_service_iam_binding" "default" {
|
||||
for_each = local.iam_roles_bindings
|
||||
for_each = var.iam_members
|
||||
service_name = google_endpoints_service.default.service_name
|
||||
role = "roles/${each.key}"
|
||||
role = each.key
|
||||
members = each.value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user