-
Notifications
You must be signed in to change notification settings - Fork 834
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wip] use data source for org name in prow-build tf
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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]" | ||
} | ||
|
||
|