Skip to content

Commit b4cb636

Browse files
author
Rene Barbosa
committed
fix: var.protocols validation
1 parent 623ab42 commit b4cb636

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/resolver-endpoints/variables.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ variable "name" {
1212
variable "protocols" {
1313
description = "The resolver endpoint protocols"
1414
validation {
15-
condition = contains(["DoH", "Do53", "DoH-FIPS"], var.protocols)
15+
condition = alltrue([
16+
for value in var.protocols : contains(["DoH", "Do53", "DoH-FIPS"], var.protocols)
17+
])
1618
error_message = "Invalid value. Valid values are `DoH`, `Do53` and `DoH-FIPS`"
1719
}
1820
type = list(string)

0 commit comments

Comments
 (0)