Fix in validation of healthchecks variable

This commit is contained in:
Miren Esnaola
2023-07-31 10:14:05 +02:00
parent 1c3d47266f
commit f49515495c
4 changed files with 18 additions and 11 deletions

View File

@@ -88,7 +88,10 @@ variable "health_check_configs" {
for k, v in var.health_check_configs : (
(try(v.grpc, null) == null ? 0 : 1) +
(try(v.http, null) == null ? 0 : 1) +
(try(v.tcp, null) == null ? 0 : 1) <= 1
(try(v.http2, null) == null ? 0 : 1) +
(try(v.https, null) == null ? 0 : 1) +
(try(v.tcp, null) == null ? 0 : 1) +
(try(v.ssl, null) == null ? 0 : 1) <= 1
)
])
error_message = "At most one health check type can be configured at a time."