[Django]-Django in Google Cloud Run cant find /cloudsql socket

0👍

Cloud Run won’t create the /cloudsql directory for you. you must create it.

also, for further instructions on how to connect to Cloud SQL from Cloud Run, you can consult this documentation

2👍

As mentioned above by @glasnt, it could also be an ACL issue. The service account needs the Cloud SQL Client role. In the default case, Default compute service account is the principal ending in compute@developer.gserviceaccount.com.

My issue was that I wasn’t given the option to add the role from where my newbie intuition led me, the Cloud Run service resource. Instead, go to the main IAM settings, IAM tab, and manually add the permission to the service account. If you don’t see the service account in the list and thus can’t edit it’s roles, you can go to Add + (top toolbar) and manually enter the email address.

Leave a comment