@@ -65,7 +65,6 @@ variable "server_machines" {
6565 config = optional (object ({
6666 cluster_init = optional (bool , false )
6767 node_name = optional (string )
68- with_node_id = optional (bool , false )
6968 node_ip = optional (string )
7069 node_external_ip = optional (string )
7170 node_label = optional (map (string ), {})
@@ -102,7 +101,6 @@ variable "agent_machine_groups" {
102101 })
103102 config = optional (object ({
104103 node_name = optional (string )
105- with_node_id = optional (bool , false )
106104 node_ip = optional (string )
107105 node_external_ip = optional (string )
108106 node_label = optional (map (string ), {})
@@ -248,6 +246,25 @@ variable "registries_config" {
248246 description = " Registry configuration to be used by k3s when generating the containerd configuration."
249247}
250248
249+ variable "drain_options" {
250+ type = object ({
251+ deletion_fallback = optional (bool , false )
252+ eviction_timeout = optional (string , " 30m" )
253+ deletion_timeout = optional (string , " 10m" )
254+ })
255+ nullable = false
256+ default = {}
257+ description = " Node drain options."
258+ validation {
259+ condition = can (timeadd (timestamp (), var. drain_options . eviction_timeout ))
260+ error_message = " The eviction_timeout must be a valid duration (e.g., '10m', '30s', '1h30m')."
261+ }
262+ validation {
263+ condition = can (timeadd (timestamp (), var. drain_options . deletion_timeout ))
264+ error_message = " The deletion_timeout must be a valid duration (e.g., '10m', '30s', '1h30m')."
265+ }
266+ }
267+
251268variable "system_upgrade_trigger" {
252269 type = string
253270 nullable = false
0 commit comments