Skip to content

Commit

Permalink
Add custom VPC support
Browse files Browse the repository at this point in the history
Add ability for user to specify subnetwork alongside the network for custom
VPC support.

When deploying in the default VPC the subnetwork flag can remain empty.
  • Loading branch information
Moe Sy committed Jul 17, 2020
1 parent c8d6dd4 commit 7ddabe0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install/terraform/modules/gke/cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ locals {
machineType = lookup(var.cluster, "machineType", "n1-standard-4")
initialNodeCount = lookup(var.cluster, "initialNodeCount", "4")
network = lookup(var.cluster, "network", "default")
subnetwork = lookup(var.cluster, "subnetwork", "")
kubernetesVersion = lookup(var.cluster, "kubernetesVersion", "1.15")
}

Expand All @@ -49,6 +50,7 @@ resource "google_container_cluster" "primary" {
location = local.zone
project = local.project
network = local.network
subnetwork = local.subnetwork

min_master_version = local.kubernetesVersion

Expand Down
1 change: 1 addition & 0 deletions install/terraform/modules/gke/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ variable "cluster" {
"initialNodeCount" = "4"
"project" = "agones"
"network" = "default"
"subnetwork" = ""
"kubernetesVersion" = "1.15"
}
}

0 comments on commit 7ddabe0

Please sign in to comment.