Skip to content

Commit

Permalink
Fixing roles for billing-iam
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunal Kumar Gupta committed Feb 11, 2020
1 parent c710204 commit 2b082fa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/setup/iam.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ locals {
int_required_ba_roles = [
"roles/billing.user",
]

int_required_ba_billing_iam_roles = [
"roles/billing.admin",
]
}

resource "google_service_account" "int_test" {
Expand Down Expand Up @@ -73,9 +77,10 @@ resource "google_billing_account_iam_member" "int_test_ba" {
}

resource "google_billing_account_iam_member" "int_test_ba_billing_iam" {
count = length(local.int_required_ba_billing_iam_roles)

billing_account_id = var.billing_iam_test_account
role = "roles/billing.admin"
role = local.int_required_ba_billing_iam_roles[count.index]
member = "serviceAccount:${google_service_account.int_test.email}"
}

Expand Down

0 comments on commit 2b082fa

Please sign in to comment.