0

I connect to our CloudSQL instances via CloudSQL proxy from my desktop. But all the instances are currently using Public IP (with SSL)

If we configure Private IP on CLoudSQL, can we still use the Proxy to connect from desktop clients (i.e. outside the vpc)?

I understand that we won't be able to connect to instances using the Private IP explicitly from outside the vpc.

Thanks

Tamara Koliada
  • 1,200
  • 2
  • 14
  • 31
Molenpad
  • 833
  • 2
  • 14
  • 34

1 Answers1

0

Using proxy requires access to the same VPC that the CloudSQL is in. The proxy only lets you connect without whitelisting in firewall the client ip, but it still requires the ip to be accessible. At docs https://cloud.google.com/sql/docs/postgres/sql-proxy under Using the proxy with private IP you can find:

If the proxy is using the same VPC network as the Cloud SQL instance, and the instance has a private IP address, the proxy can connect using private IP.

I assume if you have connected your desktop to your private VPC with Cloud VPN or Interconnect, you could be able to connect to private ip with proxy. More info on this can be found here: https://cloud.google.com/vpc/docs/configure-private-google-access-hybrid.

Veikko
  • 3,372
  • 2
  • 21
  • 31