Is it possible to register an external service withoutassigning a port?

We are unable to register an external service if we don’t provide a port.

Our Nomad apps use consul. we need to talk to an external service (SQL Server database) so we set it up as an external service in Consul and provided the IP address and port (sql default for single db of 1433) and we are able to connect.

However on another server we have several databases for different environments and each one has its own port which are dynamic and change with each reboot.

if we set them up and provide the ip and the dynamic port we can connect. however, since the port changes are each reboot we have to change the service config to reflect the new port

in normal use we provide ip address/database_name without port and it works fine.
When we try the same in consul it will not connect unless we change it to include the port name.

So is there something we are missing? are we trying to do something that is not possible i.e. register an external service without providing its port.