Skip to content

Commit

Permalink
[wip] use data source for org name in prow-build tf
Browse files Browse the repository at this point in the history
  • Loading branch information
spiffxp committed Mar 3, 2021
1 parent e7eb806 commit 310431d
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ locals {
boskos_janitor_sa_name = "boskos-janitor" // Name of the GSA and KSA used by boskos-janitor
}

data "google_organization" "org" {
domain = "kubernetes.io"
}

module "project" {
source = "../../../modules/gke-project"
project_id = local.project_id
Expand All @@ -49,8 +53,7 @@ resource "google_project_iam_member" "k8s_infra_prow_oncall" {
// Ensure [email protected] has prow.viewer access to this project
resource "google_project_iam_member" "k8s_infra_prow_viewers" {
project = local.project_id
# TODO: use data resource to get org role name instead of hardcode
role = "organizations/758905017065/roles/prow.viewer"
role = "${data.org.name}/roles/prow.viewer"
member = "group:[email protected]"
}

Expand Down

0 comments on commit 310431d

Please sign in to comment.