From d9d3976c4cca09e576fd886daab827931a98f576 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Sat, 7 Mar 2026 00:54:51 +0000 Subject: [PATCH] fix: use self-contained Terraform variable validations 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. --- terraform/variables.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/terraform/variables.tf b/terraform/variables.tf index 17cf482..b7d012c 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -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." } }