@@ -80,58 +80,20 @@ variable "max_pods" {
8080 description = " Maximum number of pods to run per node, if using CNI for networking."
8181}
8282
83- variable "default_node_pool_name" {
84- type = string
85- description = " Name of default node pool."
86- default = " default"
87- }
88-
89- variable "default_node_pool_type" {
90- type = string
91- description = " Type of default node pool. Defaults to VirtualMachineScaleSets, use AvailabilitySet for backwards compatibility with older clusters."
92- default = " VirtualMachineScaleSets"
93- }
94-
95- variable "default_node_pool_enable_auto_scaling" {
96- type = bool
97- description = " Wether to enable auto scaling for the default node pool. Defaults to true."
98- default = true
99- }
100-
101- variable "default_node_pool_min_count" {
102- type = number
103- description = " Min number of worker nodes"
104- default = 1
105- }
106-
107- variable "default_node_pool_max_count" {
108- type = number
109- description = " Max number of worker nodes"
110- default = 1
111- }
112-
113- variable "default_node_pool_node_count" {
114- type = number
115- description = " Static number of worker nodes"
116- default = 1
117- }
118-
119- variable "default_node_pool_vm_size" {
120- type = string
121- description = " VM size of worker nodes"
122- default = " Standard_D1_v2"
123- }
124-
125- variable "default_node_pool_os_disk_size_gb" {
126- type = number
127- description = " Disk size of worker nodes (in GB)"
128- default = 30
129- }
130-
131- variable "default_node_pool_only_critical_addons" {
132- type = bool
133- description = " Enabling will taint default node pool with CriticalAddonsOnly=true:NoSchedule taint. Changing this forces a new resource to be created."
134- default = false
83+ variable "default_node_pool" {
84+ type = object ({
85+ name = optional (string , " default" )
86+ type = optional (string , " VirtualMachineScaleSets" )
87+ enable_auto_scaling = optional (bool , true )
88+ min_count = optional (number , 1 )
89+ max_count = optional (number , 1 )
90+ node_count = optional (number , 1 )
91+ vm_size = optional (string , " Standard_D1_v2" )
92+ os_disk_size_gb = optional (number , 30 )
93+ only_critical_addons = optional (bool , false )
94+ })
95+ description = " Default node pool configuration."
96+ default = {}
13597}
13698
13799variable "disable_default_ingress" {
@@ -201,17 +163,12 @@ variable "vertical_pod_autoscaler_enabled" {
201163 description = " Whether Vertical Pod Autoscaler should be enabled for the cluster."
202164}
203165
204- variable "upgade_settings_drain_timeout_in_minutes" {
205- type = number
206- description = " The amount of time in minutes to wait on eviction of pods and graceful termination per node."
207- }
208-
209- variable "upgade_settings_max_surge" {
210- type = string
211- description = " The maximum number or percentage of nodes which will be added to the Node Pool size during an upgrade."
212- }
213-
214- variable "upgade_settings_node_soak_duration_in_minutes" {
215- type = number
216- description = " The amount of time in minutes to wait after draining a node and before reimaging and moving on to next node."
166+ variable "upgrade_settings" {
167+ type = object ({
168+ max_surge = optional (string , " 10%" )
169+ drain_timeout_in_minutes = optional (number , 0 )
170+ node_soak_duration_in_minutes = optional (number , 0 )
171+ })
172+ description = " Upgrade settings for the default node pool."
173+ default = {}
217174}
0 commit comments