File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
infra/gcp/terraform/boskos Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -46,4 +46,16 @@ module "folder_iam" {
4646 ]
4747 }
4848
49+ conditional_bindings = [
50+ {
51+ role = " roles/admin" # Similar to Owner but can use IAM Conditions
52+ title = " admin-scale-projects-only"
53+ description = " Admin access to scale boskos projects only"
54+ expression = " resource.name.startsWith(\" k8s-infra-e2e-boskos-scale\" )"
55+ members = [
56+ 57+ ]
58+ }
59+ ]
60+
4961}
Original file line number Diff line number Diff line change @@ -20,9 +20,20 @@ resource "google_folder" "boskos" {
2020}
2121
2222locals {
23- boskos_projects = [
23+ boskos_e2e_projects = [
2424 for i in range (" 001" , " 160" ) : format (" k8s-infra-e2e-boskos-%03d" , i)
2525 ]
26+ boskos_scale_e2e_projects = [
27+ for i in range (" 01" , " 30" ) : format (" k8s-infra-e2e-boskos-scale-%02d" , i)
28+ ]
29+ boskos_gpu_e2e_projects = [
30+ for i in range (" 01" , " 10" ) : format (" k8s-infra-e2e-boskos-gpu-%02d" , i)
31+ ]
32+ boskos_projects = concat (
33+ local. boskos_e2e_projects ,
34+ local. boskos_scale_e2e_projects ,
35+ local. boskos_gpu_e2e_projects
36+ )
2637}
2738
2839module "project" {
@@ -102,6 +113,12 @@ import {
102113 id = each. value
103114}
104115
116+ import {
117+ for_each = toset (local. boskos_projects )
118+ to = module. artifact_registry [each . key ]. google_artifact_registry_repository . repo
119+ id = " projects/${ each . value } /locations/us/repositories/gcr.io"
120+ }
121+
105122import {
106123 for_each = toset (local. boskos_projects )
107124 to = google_compute_project_metadata. default [each . key ]
You can’t perform that action at this time.
0 commit comments