From 1151d5db93cb222f26d24c0577c31083ab7bff2c Mon Sep 17 00:00:00 2001 From: Krishnan Gopal Date: Fri, 8 Mar 2024 19:15:26 +0000 Subject: [PATCH 1/3] add apphub.admin role for the organizations that the CI runs the tests --- .ci/infra/terraform/main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.ci/infra/terraform/main.tf b/.ci/infra/terraform/main.tf index 439d37f5e8b3..78615e37aaeb 100644 --- a/.ci/infra/terraform/main.tf +++ b/.ci/infra/terraform/main.tf @@ -147,6 +147,12 @@ resource "google_billing_account_iam_member" "sa_master_billing_log_writer" { member = google_service_account.sa.member } +resource "google_billing_account_iam_member" "apphub_admin" { + billing_account_id = data.google_billing_account.master_acct.id + role = "roles/apphub.admin" + member = google_service_account.sa.member +} + resource "google_app_engine_application" "app" { project = google_project.proj.project_id location_id = "us-central" From 601341810457db47454859dceca51c4adb3171f2 Mon Sep 17 00:00:00 2001 From: Krishnan Gopal Date: Fri, 8 Mar 2024 20:03:44 +0000 Subject: [PATCH 2/3] Change to use org instead of billing id --- .ci/infra/terraform/main.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/infra/terraform/main.tf b/.ci/infra/terraform/main.tf index 78615e37aaeb..71e2f05a8d2e 100644 --- a/.ci/infra/terraform/main.tf +++ b/.ci/infra/terraform/main.tf @@ -135,6 +135,12 @@ resource "google_organization_iam_member" "sa_storage_admin" { member = google_service_account.sa.member } +resource "google_organization_iam_member" "apphub_admin" { + billing_account_id = data.google_organization.org.org_id + role = "roles/apphub.admin" + member = google_service_account.sa.member +} + resource "google_billing_account_iam_member" "sa_master_billing_admin" { billing_account_id = data.google_billing_account.master_acct.id role = "roles/billing.admin" @@ -147,12 +153,6 @@ resource "google_billing_account_iam_member" "sa_master_billing_log_writer" { member = google_service_account.sa.member } -resource "google_billing_account_iam_member" "apphub_admin" { - billing_account_id = data.google_billing_account.master_acct.id - role = "roles/apphub.admin" - member = google_service_account.sa.member -} - resource "google_app_engine_application" "app" { project = google_project.proj.project_id location_id = "us-central" From 78fb1217dd5c331b3ba3f922e39afb074227da93 Mon Sep 17 00:00:00 2001 From: Krishnan Gopal Date: Fri, 8 Mar 2024 20:18:09 +0000 Subject: [PATCH 3/3] Change to use org instead of billing id --- .ci/infra/terraform/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/infra/terraform/main.tf b/.ci/infra/terraform/main.tf index 71e2f05a8d2e..0567107882fd 100644 --- a/.ci/infra/terraform/main.tf +++ b/.ci/infra/terraform/main.tf @@ -136,7 +136,7 @@ resource "google_organization_iam_member" "sa_storage_admin" { } resource "google_organization_iam_member" "apphub_admin" { - billing_account_id = data.google_organization.org.org_id + org_id = data.google_organization.org.org_id role = "roles/apphub.admin" member = google_service_account.sa.member }