最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Connecting cloud run on GCP A to cloud sql on GCBP B using a proxy - Stack Overflow

matteradmin8PV0评论

So I have been trying this for some times and I can't figure it out. There are multiple ways as per the chatgpt instructions and not a consistent recommendation thus time for human brain here :)

So I am working with client who has cloud SQL instance and cloud sql Auth installed on their GCP (called it GCP B). In my GCP (GCP A), I have a cloud run application that needs to connect to the database (I assume through cloud auth).

I got the client to add my cloud run default cloud run GCP A service account [email protected] to his IAM roles with cloud sql client role. I did the same in my IAM and gave it admin and client role.

and I deployed my cloud run as follows:

gcloud run deploy <SERVICE_NAME>
--image <IMAGE_URL>
--add-cloudsql-instances <PROJECT_ID>::<INSTANCE_ID>
--region
--project <RUN_PROJECT_ID>

I keep getting connection error. Then I tried getting the cloud SQL service name from the client and I added it to my IAM and same issue.

What am I missing here? what are the true steps to make it work I

Post a comment

comment list (0)

  1. No comments so far