connectiong to a cloudSQL private IP instance without creating a new VM instance

1k views Asked by At

I was wondering if there's any possible solution to connect a GCP AIP tunnel to a DB (Cloud SQL Proxy) when the DB has no public IP.

I don't want to create a new VM for this purpose so I'm only interested in solutions that don't require me to use a VM.

Thanks in advance.

1

There are 1 answers

0
kurtisvg On

There are two ways to connect your on-prem network to the VPC, but both are fairly involved (and potentially expensive):

  1. You can use Cloud Interconnect
  2. You can use Cloud VPN to set up a HA VPN

For both scenarios, you'll also need to configure Cloud Router to export the routes to your Cloud SQL instance into your on-prem network.

Additionally (if you have control of your constraints) you could revisit the idea of using Public IP. Using the Cloud SQL Auth proxy allows you to authorize your connections using an IAM identity as opposed to traditional firewalling or SSL certs. You can even use org policies to restrict Authorized Networks, making the Auth proxy required to connect. enter link description here