diff --git a/modules/gke-cluster/main.tf b/modules/gke-cluster/main.tf index faf435e4d..9de06be8f 100644 --- a/modules/gke-cluster/main.tf +++ b/modules/gke-cluster/main.tf @@ -279,7 +279,6 @@ resource "google_container_cluster" "cluster" { } dynamic "notification_config" { - for_each = var.notification_config != null ? [""] : [] content { pubsub { @@ -288,7 +287,6 @@ resource "google_container_cluster" "cluster" { } } } - } resource "google_compute_network_peering_routes_config" "gke_master" { diff --git a/modules/gke-cluster/variables.tf b/modules/gke-cluster/variables.tf index 8b38a8aec..4c2bf2ecd 100644 --- a/modules/gke-cluster/variables.tf +++ b/modules/gke-cluster/variables.tf @@ -236,11 +236,13 @@ variable "node_locations" { type = list(string) default = [] } + variable "notification_config" { description = "GKE Cluster upgrade notifications via PubSub." type = bool default = false } + variable "peering_config" { description = "Configure peering with the master VPC for private clusters." type = object({