GCP Cloud Run Service scenarios to Connect to Private VPC Subnet in Go Application
I'm trying to figure out I'm trying to configure I've been working on this all day and I'm upgrading from an older version and I'm running a Go application deployed on GCP Cloud Run, and I'm trying to connect to a PostgreSQL database that resides in a private VPC subnet. Despite configuring the necessary VPC access connector, I'm working with a persistent connection behavior: `dial tcp <DB_IP>:5432: connect: network is unreachable`. I've verified that the Cloud Run service has the correct IAM roles assigned, specifically `roles/run.invoker` and `roles/cloudsql.client`, but it seems that the network isn't allowing access to the database. Hereβs the configuration for the Cloud Run service: ```yaml apiVersion: serving.knative.dev/v1 kind: Service metadata: name: my-go-service spec: template: metadata: annotations: run.googleapis.com/vpc-access-connector: projects/my-project/locations/us-central1/connectors/my-connector spec: containers: - image: gcr.io/my-project/my-go-app:latest env: - name: DATABASE_URL value: "postgres://user:password@<DB_IP>:5432/mydb" ``` I've also tried testing the connection from another Cloud Run instance with a public IP, but that works fine, leading me to believe it's an scenario with the VPC configuration or the connector itself. Are there specific firewall rules that I need to check or additional IAM roles that might be necessary for Cloud Run to access the VPC? Anyone else experience similar issues with VPC connectivity from Cloud Run? Thanks in advance for any insights! The stack includes Go and several other technologies. Thanks for your help in advance! The stack includes Go and several other technologies. Am I missing something obvious? This is for a desktop app running on macOS. What's the correct way to implement this?