AlloyDB integration with Temporal

We are facing issues when trying to attach an AlloyDB auth proxy sidecar to Temporal. Temporal is working when connected to a standard postgres db and the AlloyDB sidecar is working when attached to other pods, but Temporal and AlloyDB are not working together.

The error we are seeing in Temporal is:
{"level":"info","ts":"2025-03-28T16:00:15.571Z","msg":"matching client encountered error","service":"frontend","error":"Not enough hosts to serve the request","service-error-type":"serviceerror.Unavailable","logging-call-at":"/home/runner/work/docker-builds/docker-builds/temporal/client/matching/metric_client.go:221"}

The error we are seeing in AlloyDB is:
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: lookup tcp///alloydb.googleapis.com: unknown port"

Has anyone gotten AlloyDB to work with Temporal? Or does anyone have any pointers or troubleshooting steps?

Just adding same answer as for same question asked on community slack.

You probably can look at your generated static config /etc/config/temporal/docker.yaml and see what your connection host and port are set to, as from error looks like connection issue.

Not enough hosts to serve the request

Can you check which service types (matching/history/system-worker) didnt start up / are crashing?