/* Copyright 2025 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ resource "google_folder" "boskos" { display_name = "Boskos" parent = "organizations/758905017065" } locals { boskos_e2e_projects = [ for i in range("001", "160") : format("k8s-infra-e2e-boskos-%03d", i) ] boskos_scale_e2e_projects = [ for i in range("01", "30") : format("k8s-infra-e2e-boskos-scale-%02d", i) ] boskos_gpu_e2e_projects = [ for i in range("01", "10") : format("k8s-infra-e2e-boskos-gpu-%02d", i) ] # these are special boskos projects used for debugging prow jobs + the 5k project dev_boskos_projects = [ "k8s-infra-e2e-gce-project", "k8s-infra-e2e-gpu-project", "k8s-infra-e2e-ingress-project", "k8s-infra-e2e-node-e2e-project", "k8s-infra-e2e-scale-project", "k8s-infra-e2e-scale-5k-project", ] boskos_projects = concat( local.boskos_e2e_projects, local.boskos_scale_e2e_projects, local.boskos_gpu_e2e_projects, local.dev_boskos_projects ) } module "project" { for_each = toset(local.boskos_projects) source = "terraform-google-modules/project-factory/google" version = "~> 18.0" name = each.key project_id = each.key folder_id = google_folder.boskos.id org_id = "758905017065" billing_account = "018801-93540E-22A20E" # Sane project defaults default_service_account = "keep" disable_services_on_destroy = false create_project_sa = false random_project_id = false activate_apis = [ "artifactregistry.googleapis.com", "cloudbuild.googleapis.com", "cloudkms.googleapis.com", "cloudresourcemanager.googleapis.com", "cloudscheduler.googleapis.com", "compute.googleapis.com", "container.googleapis.com", "file.googleapis.com", "logging.googleapis.com", "monitoring.googleapis.com", "secretmanager.googleapis.com", "cloudasset.googleapis.com", ] } resource "google_compute_project_metadata" "default" { for_each = toset(local.boskos_projects) project = module.project[each.key].project_id metadata = { enable-oslogin = "FALSE" ssh-keys = <