From 8e701c9fc18ce99cb95180fb8e644937aba60ea0 Mon Sep 17 00:00:00 2001 From: Marques Johansson Date: Tue, 13 Aug 2024 18:04:16 -0400 Subject: [PATCH] fix: example nutanix_node_count must default to an odd number Signed-off-by: Marques Johansson --- examples/cluster-migration/variables.tf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cluster-migration/variables.tf b/examples/cluster-migration/variables.tf index 72b8130..6b3dbbf 100644 --- a/examples/cluster-migration/variables.tf +++ b/examples/cluster-migration/variables.tf @@ -27,8 +27,12 @@ variable "create_project" { variable "nutanix_node_count" { type = number - default = 2 - description = "The number of Nutanix nodes to create." + default = 1 + description = "The number of Nutanix nodes to create. This must be an odd number." + validation { + condition = var.nutanix_node_count % 2 == 1 + error_message = "The number of Nutanix nodes must be an odd number." + } } # tflint-ignore: terraform_unused_declarations variable "create_vlan" {