Skip to content

Commit 8529b63

Browse files
committed
Add remove_default_node_pool var for zonal and regional cluster
1 parent 60baab8 commit 8529b63

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

cluster_regional.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ resource "google_container_cluster" "primary" {
8181
service_account = "${lookup(var.node_pools[0], "service_account", var.service_account)}"
8282
}
8383
}
84+
85+
remove_default_node_pool = "${var.remove_default_node_pool}"
8486
}
8587

8688
/******************************************

cluster_zonal.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ resource "google_container_cluster" "zonal_primary" {
8181
service_account = "${lookup(var.node_pools[0], "service_account", var.service_account)}"
8282
}
8383
}
84+
85+
remove_default_node_pool = "${var.remove_default_node_pool}"
8486
}
8587

8688
/******************************************

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,11 @@ variable "ip_range_services" {
117117
description = "The secondary ip range to use for pods"
118118
}
119119

120+
variable "remove_default_node_pool" {
121+
description = "Remove default node pool while setting up the cluster"
122+
default = false
123+
}
124+
120125
variable "node_pools" {
121126
type = "list"
122127
description = "List of maps containing node pools"

0 commit comments

Comments
 (0)