From f55f9f9573cae227cdf1f47b4857c7d18fb2da6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Reyes?= Date: Thu, 29 Feb 2024 15:09:42 -0300 Subject: [PATCH] add validation of tz found --- util/util.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/util.go b/util/util.go index 1a6ee0828..4f24958ba 100644 --- a/util/util.go +++ b/util/util.go @@ -284,7 +284,8 @@ func ValidateTZValueDiagFunc(v interface{}, p cty.Path) diag.Diagnostics { value := v.(string) valid := false - if sort.SearchStrings(validTZ, value) < len(validTZ) { + foundAt := sort.SearchStrings(validTZ, value) + if foundAt < len(validTZ) && validTZ[foundAt] == value { valid = true }