connect to private ip cloudsql from laptop

Hi everybody

I try to connect DBeaver directly to postgres cloud sql. Scenario id this

1) Clod sql with only provate IP

2) Bastion host with only private IP. On this bastion host j have activated a cloud proxy ./cloud-sql-proxy --address 0.0.0.0 --port 6000 project:europe-west8:postgres-server --private-ip --credentials-file cloudsqlcredential.json

3) on laptop j've create a tunnel with this command: gcloud compute start-iap-tunnel spk-test-cclog 6000 --local-host-port=localhost:1000

It work. but my question is: there is way to simply connect DBeaver? can i add some option to gcloud compute start-iap-tunnel command to automatically  port forward without use cloud-sql-proxy ?

 

BR

 

1 1 313
1 REPLY 1

Hi @antfrasparkle,

Welcome to Google Cloud Community!

I would suggest checking out the following blogs on connecting DBeaver to Cloud SQL PostgreSQL:

But if you really prefer private IP, you may check the following documentations on connecting using private IP:

Hope this helps.