1

I currently have a project with a compute instance, connected to a managed Cloud SQL database. When they set it up, they allocated the IP range for the SQL instance and I see it in the current project VPC.

This is a short recap of the IPs and projects I have:

proj-existing 172.30.0.221 sql-in-proj-existing 10.236.176.10 proj-new 10.154.0.6 

VPC name is the same for the two projects.

Now I'd like to be able to access this Cloud SQL instance from proj-new. I've read this is possible, but I'm probably missing some pieces.

I think the guide I need to follow is this one. But I cannot allocate a new subnet with the same address as the existing cloud instance. And it won't let me create a new private link without a subnet.

OTOH, if I add a configuration in VPC network peering, it won't turn up because it doesn't have the corresponding peering request on the other end.

So I miss how to create the Private Service Connection between proj-new and sql-in-proj-existing.

2 Answers 2

1

As per bhito from a previous post with the same concern, here is the documentation used as reference on how to connect Cloud SQL to another project.

It's a must to contact support to manually enable the exchange of custom routes for your Cloud SQL speckle umbrella for it will never work. As of the moment, this process can only be done through contacting support and an ongoing feature request was submitted so it won't need to contact support for enabling the exchange of custom routes

Sign up to request clarification or add additional context in comments.

Comments

0
  1. Recommend Using Private Service Connect: After getting the service attachment URI and using it to create the Private Service Connect endpoint then you may connect directly through an internal IP address.

  2. VPC Peering with Proxy in sql-in-proj-existing: Assuming your Cloud SQL instance is created in the sql-in-proj-existing project, and you intend to establish a connection from proj-new, consider setting up VPC peering between the two projects. Additionally, create a proxy within the sql-in-proj-existing project.

    Note: While it's possible to peer three projects (A -> B -> C), direct connectivity from A to C may not be achievable. The Cloud SQL instance is located in a GCP-managed VPC, which implies that it is already peered with your sql-in-proj-existing project. That's why we need a proxy in B.

  3. VPN Setup between sql-in-proj-existing and proj-new: Another approach is to establish a Virtual Private Network (VPN) between the sql-in-proj-existing and proj-new projects. Comparatively, the first option may be more cost-effective, involving the creation of a proxy VM in the sql-in-proj-existing project.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.