diff --git a/templates/connect b/templates/connect index 33edb69..63c64d0 100644 --- a/templates/connect +++ b/templates/connect @@ -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"