diff --git a/google_gke/cluster.tf b/google_gke/cluster.tf index 7c53c593..fc5399b3 100644 --- a/google_gke/cluster.tf +++ b/google_gke/cluster.tf @@ -38,6 +38,10 @@ resource "google_container_cluster" "primary" { } } + default_snat_status { + disabled = var.disable_snat_status + } + # Networking: Defaulting to Shared VPC Setup network = local.network subnetwork = local.subnetwork diff --git a/google_gke/variables.tf b/google_gke/variables.tf index 80a2627d..6f76d599 100644 --- a/google_gke/variables.tf +++ b/google_gke/variables.tf @@ -84,6 +84,12 @@ variable "enable_dataplane" { type = bool } +variable "disable_snat_status" { + default = false + description = "Whether the cluster disables default in-node sNAT rules. Defaults to false." + type = bool +} + variable "shared_vpc_outputs" { default = null description = "Sets networking-related variables based on a homegrown Shared VPC Terraform outputs data structure."