diff --git a/solutions/fully-configurable/variables.tf b/solutions/fully-configurable/variables.tf index f8963168..8aebc40c 100644 --- a/solutions/fully-configurable/variables.tf +++ b/solutions/fully-configurable/variables.tf @@ -37,7 +37,7 @@ variable "prefix" { validation { # must not exceed 16 characters in length - condition = length(var.prefix) <= 16 + condition = var.prefix == null || var.prefix == "" ? true : length(var.prefix) <= 16 error_message = "Prefix must not exceed 16 characters." } } diff --git a/solutions/security-enforced/variables.tf b/solutions/security-enforced/variables.tf index 456d7d0b..38bd3c50 100644 --- a/solutions/security-enforced/variables.tf +++ b/solutions/security-enforced/variables.tf @@ -37,7 +37,7 @@ variable "prefix" { validation { # must not exceed 16 characters in length - condition = length(var.prefix) <= 16 + condition = var.prefix == null || var.prefix == "" ? true : length(var.prefix) <= 16 error_message = "Prefix must not exceed 16 characters." } }