Connect to Cloud SQL instance from Cloud Run service using Private IP (Direct VPC egress)

Hello ,

  I am writing a Node JS/Express server that uses a mysql connection to Cloud SQL instance using private IP / TCP based connections. I am looking at this link and it still mentions using a VPC Serverless connector. Is this out of date since I came across a google cloud blog that mentions direct access (without vpc serverless connector) is now supported and is in preview. Is it not recommended for Production scenarios?

0 2 230
2 REPLIES 2

Hi,

I believe “Direct VPC egress with a VPC network” is just an added feature wherein you can create connections directly when creating a Cloud Run service. Not like VPC connector, you need to create VPC connector first before creating Cloud Run with private connection.

Also, there are other services that have a VPC connector that can be used, like Cloud Function.

Thanks @VannGuce I understand direct egress is just an other option eliminating the need for VPC connector. My question was more to do with is the direct option ready for production use cases considering that it is still in Preview.