diff --git a/main.tf b/main.tf index a98064e..42aa2c2 100644 --- a/main.tf +++ b/main.tf @@ -7,10 +7,10 @@ data "http" "local_ip" { url = "http://ipv4.icanhazip.com/s" } -data "google_container_engine_versions" "versions" { - location = var.zonal_cluster ? local.zone : local.region - version_prefix = "1.14." -} +# data "google_container_engine_versions" "versions" { +# location = var.zonal_cluster ? local.zone : local.region +# version_prefix = "1.14." +# } # GKE cluster resource "google_container_cluster" "primary" { @@ -47,7 +47,7 @@ resource "google_container_cluster" "primary" { # https://www.terraform.io/docs/providers/google/r/container_cluster.html#node_pool location = var.zonal_cluster ? local.zone : local.region - min_master_version = data.google_container_engine_versions.versions.latest_master_version + min_master_version = var.kube_version_gke network = local.core_network_id subnetwork = local.gke_subnetwork_id diff --git a/node_pools.tf b/node_pools.tf index cbbe83b..04013fc 100644 --- a/node_pools.tf +++ b/node_pools.tf @@ -13,7 +13,8 @@ resource "google_container_node_pool" "node_pool_mt" { # these can't be created or deleted at the same time. depends_on = [google_container_node_pool.node_pool_platform] - version = data.google_container_cluster.primary.master_version + # version = data.google_container_cluster.primary.master_version + version = var.kube_version_gke # We want the multi-tenant node pool to be completely replaced # instead of rolling deployment. @@ -121,7 +122,8 @@ resource "google_container_node_pool" "node_pool_platform" { # delete = "30m" # } - version = data.google_container_cluster.primary.master_version + # version = data.google_container_cluster.primary.master_version + version = var.kube_version_gke location = var.zonal_cluster ? local.zone : local.region cluster = google_container_cluster.primary.name diff --git a/variables.tf b/variables.tf index cdd7cba..f99dcdf 100644 --- a/variables.tf +++ b/variables.tf @@ -8,6 +8,11 @@ variable "dns_managed_zone" { description = "The name of the google dns managed zone we should use" } +variable "kube_version_gke" { + default = "1.14.6-gke.2" + description = "The kubernetes version to use in GKE" +} + variable "machine_type" { default = "n1-standard-4" description = "The GCP machine type for GKE worker nodes running multi-tenant workloads"