Reputation: 356
I am working on a pipeline to perform data transformation of data residing on GCP cloud SQL with private IP on a different project by using the Vertex AI pipeline. I am not able to get any documents regarding connecting to Cloud SQL in it. Does anyone have any idea how to connect Cloud SQL with Private IP to the Vertex AI pipeline?
Upvotes: 4
Views: 1641
Reputation: 477
I implemented something similar using the AI Platform. Relevant post here: How can I grant AI Platform training jobs access to Cloud SQL resources in the same project?
Upvotes: 1
Reputation: 3565
This was also asked on the Cloud SQL Auth proxy repo. Adding the answer here for posterity:
I've never used Vertex AI, but from a quick scan of the docs, I see there's support for VPC network peering.
So, roughly (and without having tried this myself), the steps would be:
- Configure a VPC network peering between Vertex AI and your VPC that hosts the private IP instance
- Assuming you're running a custom container, you could:
- either start the proxy as a background process and connect to it,
- or if you're using one of the languages supported by the proxy connectors (i.e., Go, Java, and Python), you could dial directly to your DB with that connector.
Upvotes: 2