Skip to content

Commit

Permalink
Create e2e test clusters with multiple k8s versions (googleforgames#2962
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gongmax committed Feb 12, 2023
1 parent aed29cf commit eec3c87
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions build/terraform/e2e/module.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,32 @@ terraform {
}

variable "project" {}
variable "kubernetes_versions" {
description = "Create e2e test clusters with these k8s versions"
type = list(string)
default = ["1.23", "1.24", "1.25"]
}

module "gke_standard_cluster" {
# TODO: remove this cluster once the e2e tests are switched to use the new standard clusters
module "gke_standard_cluster_old" {
source = "./gke-standard"
project = var.project
kubernetesVersion = "1.24"
overrideName = "e2e-test-cluster"
}

module "gke_standard_cluster" {
for_each = toset(var.kubernetes_versions)
source = "./gke-standard"
project = var.project
kubernetesVersion = each.value
}

module "gke_autopilot_cluster" {
for_each = toset(var.kubernetes_versions)
source = "./gke-autopilot"
project = var.project
kubernetesVersion = "1.24"
kubernetesVersion = each.value
}

resource "google_compute_firewall" "udp" {
Expand Down

0 comments on commit eec3c87

Please sign in to comment.