Fail if no local_bind_port is defined
This commit is contained in:
parent
2f03b5c8b5
commit
6eff79ad64
|
@ -18,6 +18,8 @@
|
|||
local_bind_port = [[ $upstream.local_bind_port ]]
|
||||
[[- else if and (has $ "connect_services") (has $.connect_services $upstream.destination_name) (has (index $.connect_services $upstream.destination_name) "port") ]]
|
||||
local_bind_port = [[ (index $.connect_services $upstream.destination_name).port ]]
|
||||
[[- else ]]
|
||||
[[- test.Fail (printf "Service %s has no local_bind_port defined" $upstream.destination_name) ]]
|
||||
[[- end ]]
|
||||
# Work arround, see https://github.com/hashicorp/nomad/issues/18538
|
||||
destination_type = "service"
|
||||
|
|
Loading…
Reference in New Issue