postgres_fdw connect one CloudSQL to another not in same VPC/org

77 views
Skip to first unread message

Matthieu Delmas

unread,
Feb 12, 2021, 11:24:58 AM2/12/21
to Google Cloud SQL discuss
Hi there :)

I'm trying to figure out how to use postgres_fdw extension. I need to access from one instance A CloudSQL another instance B CloudSQL. 

configuration : 
  • instance A is under a different organization and vpc from instance B. 
  • instance B is under a different organization and vpc from instance A. 

research :
  • connection from CloudSQL A to CloudSQL B using public IP seems not working (i've tried to add 0.0.0.0/0 on instance B whitelist, but still not working)
  • we can't use VPC peering or Cloud VPN for this (because of the way CloudSQL instances are already connected to there own VPC)
  • shared VPC can be a solution (need to rework our network config) but this wont work if instance B is not in GCP but an "on-premise" DB i'm hosting i think.
  • setup a GCE VM on same project as instance A. This VM will "proxy" outgoing traffic from instance A to the other ? (so ill need to whiteliste the GCE VM to instance B)


Thanks for reading, 
Any help would be really nice,

Matt

Matthieu Delmas

unread,
Feb 12, 2021, 8:26:42 PM2/12/21
to Google Cloud SQL discuss
I've found this article, tested, and it's OK for us :)
Reply all
Reply to author
Forward
0 new messages