From f31ffda4f921f323e2e69de6cd5517b79a150dc3 Mon Sep 17 00:00:00 2001 From: "David.Houck" Date: Tue, 10 Dec 2024 10:23:10 -0500 Subject: [PATCH] Refine validation error message for netapp_size_in_tb variable Signed-off-by: David.Houck --- variables.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/variables.tf b/variables.tf index 1ac7515d..99abcbd4 100644 --- a/variables.tf +++ b/variables.tf @@ -500,8 +500,8 @@ variable "netapp_size_in_tb" { default = 4 validation { - condition = var.netapp_size_in_tb != null ? var.netapp_size_in_tb >= 4 && var.netapp_size_in_tb <= 500 : null - error_message = "ERROR: netapp_size_in_tb - value must be between 4 and 500." + condition = var.netapp_size_in_tb != null ? var.netapp_network_features == "Basic" ? var.netapp_size_in_tb >= 4 && var.netapp_size_in_tb <= 500 : var.netapp_size_in_tb >= 1 && var.netapp_size_in_tb <= 500 : null + error_message = "ERROR: netapp_size_in_tb - For 'Basic' netapp_network_features, value must be between 4 and 500, for 'Standard' netapp_network_features, value must be between 1 and 500." } }