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 }