fix: use self-contained Terraform variable validations
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 17s
Terraform variable validation blocks can only reference the variable under validation. Replace count-based checks with fixed-length validations for the current 3 control planes and 3 workers.
This commit is contained in:
@@ -105,8 +105,8 @@ variable "control_plane_ips" {
|
||||
description = "Static IPv4 addresses for control plane VMs"
|
||||
|
||||
validation {
|
||||
condition = length(var.control_plane_ips) == var.control_plane_count
|
||||
error_message = "control_plane_ips length must match control_plane_count."
|
||||
condition = length(var.control_plane_ips) == 3
|
||||
error_message = "control_plane_ips must contain exactly 3 IPs."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,8 +116,8 @@ variable "worker_ips" {
|
||||
description = "Static IPv4 addresses for worker VMs"
|
||||
|
||||
validation {
|
||||
condition = length(var.worker_ips) == var.worker_count
|
||||
error_message = "worker_ips length must match worker_count."
|
||||
condition = length(var.worker_ips) == 3
|
||||
error_message = "worker_ips must contain exactly 3 IPs."
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user