Several Consul connect upstreams?

Hello,
Do you know how I can set several connect upstreams (with a port & destination each) ?

I can’t find anything but a single upstream in the docs, like that :

service {
      name = "count-dashboard"
      port = "9002"

      connect {
        sidecar_service {
          proxy {
            upstreams {
              destination_name = "count-api"
              local_bind_port  = 8080
            }
          }
        }
      }
    }

I guess I can :

  1. add a prefix to the url,
  2. send to a consul service-router using this prefix for the routing
  3. use the prefix_rewrite in the destination to remove the prefix I added

… but I wonder if there’s a more idiomatic way to do that.

best,
Matthieu

Ok, if someone is interested, you can actually put several upstreams stanza in the same connect :

     connect {
        sidecar_service {
          proxy {
            upstreams {
              destination_name = "svc1"
              local_bind_port = 11111
            }
            upstreams {
              destination_name = "svc2"
              local_bind_port = 22222
            }
          }
        }
      }