File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,18 +16,14 @@ resource "google_project_iam_member" "invoker_basic" {
1616
1717// Allow agents to impersonate the invoker agent
1818resource "google_service_account_iam_binding" "invoker_impersonators" {
19- for_each = var. invoker_impersonators
20-
2119 service_account_id = google_service_account. invoker . id
2220 role = " roles/iam.serviceAccountTokenCreator"
23- members = [" serviceAccount:${ each . value } " ]
21+ members = [for email in var . invoker_impersonators : " serviceAccount:${ email } " ]
2422}
2523
2624// Allow agents to create open id token
2725resource "google_service_account_iam_binding" "invoker_idtoken" {
28- for_each = var. invoker_impersonators
29-
3026 service_account_id = google_service_account. invoker . id
3127 role = " roles/iam.serviceAccountOpenIdTokenCreator"
32- members = [" serviceAccount:${ each . value } " ]
28+ members = [for email in var . invoker_impersonators : " serviceAccount:${ email } " ]
3329}
You can’t perform that action at this time.
0 commit comments