Where and How to specify mesh_gateway / datacenter stanza in Nomad Job file

Hi Everyone

Running consul and nomad, federated across 2 datacentres.
Consul connect enabled for all services and working. Mesh Gateways deployed in each datacentre.

The pain in my behind, how to get the services to talk cross datacentres.

Here is a normal Example for local service over consul connect. No mesh gateway needed, which works 100%:

      connect {
    sidecar_service {
      proxy {
        upstreams {
          local_bind_port = 8556
          destination_name = "local_upstream_service"
        }
      }
    }
  }

But for a remote service, I am stumped.

The Consul documentation mentions mesh_gateway and datacenter tags, however, there is no mention of it in Nomad documentation.

Basically I am looking for something like the below, just a working version :slight_smile:

      connect {
    sidecar_service {
      proxy {    
        upstreams {
          mesh_gateway {
           mode = "remote"
          }
          datacenter = "secondary" 
          local_bind_port = 8680
          destination_name = "remote_upstream_service"
        }
      }
    }
  }

Any assistance or direction would be greatly appreciated.
Cheers
Carel