Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
Cannot connect to Cloud SQL from Cloud Build docker run step

I've got a custom cloud build which runs a docker image hosted in our google container registry and is not able to connect to our Cloud SQL hosted postgres w/ SSL auth and public IP without a time out (1800 s).

The docker container has the correct client keys and root cert as well as password to connect to the Cloud SQL read replica, as I've tested this build locally with the same docker run command, and it can connect correctly (using a whitelisted IP from the computer running the docker build locally). However, when running on cloud build with the default cloud build service account, it currently always time out and is not able to connect to cloud sql.

What I've Tried

  • Enabling Cloud SQL Viewer or Cloud SQL Editor permission on the cloud build service account
  • Double / triple / quadruple checking all values being used to open the postgres connection to Cloud SQL
  • Rotated certs/keys for Cloud SQL
  • I've tried setting up a VPC for Cloud SQL and all of our services should be on the same network, (default), and pointing the container's connection IP for postgres to the private network IP, and this still does not work (still timeout error)
  • Rebuilding the docker image in the cloud build step in case there was some difference in my local docker image and the one on cloud build
  • Strangely, this used to work last Friday, and nothing in our code base or Postgres details have changed, so we suspect something changed on GCE's end.
  • Setting Cloud SQL to allow all connections (0.0.0.0/0) works as expected, pointing to a likely issue with the service account not being setup with the correct access to Cloud SQL (Note I have set the service account's permissions to have either Cloud SQL Viewer or Cloud SQL Editor, and both still result in timeout)
over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!