My Cloud Function can't connect to my Cloud SQL PostgreSQL instance. I'm receiving the error:
psycopg2.OperationalError: could not connect to server: Connection timed out
Is the server running on host "my.private.db.ip" and accepting
TCP/IP connections on port 5432?
There are 2 projects(A and B), connected via VPC Peering.
- Project A - Cloud SQL PostgreSQL
- Project B - Cloud Function
Is there restrictions on using this architecture?
- I'm trying to connect to my DB using private IP.
- Already have other Cloud Functions on project B connecting with sucess to VM instances on Project A.
Note: I'm trying to not use public ip for this connection.