From 8e6aee9bae6e7ddecd70a32cfc3b01445528b0b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix-Antoine=20Fortin?= Date: Fri, 20 Sep 2024 15:47:59 -0400 Subject: [PATCH] Allow empty string var.hieradata Simplify things with MC-Hub --- common/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/variables.tf b/common/variables.tf index cbb8381b..8edaf942 100644 --- a/common/variables.tf +++ b/common/variables.tf @@ -89,7 +89,7 @@ variable "hieradata" { default = "---" description = "String formatted as YAML defining hiera key-value pairs to be included in the puppet environment" validation { - condition = can(yamldecode(var.hieradata)) + condition = var.hieradata == "" || can(yamldecode(var.hieradata)) error_message = "Hieradata needs to be valid YAML" } }