I am having trouble connecting to cloudSQL from CF gen2. I was using gen1 functions and deploying them with gcloud functions deploy command. The connection is through Unix Socket. Cloud SQL runs on public IP. The runtime of the cloud functions is php.
The connection from CF gen1 was straighforward, but since gen2 runs on Cloud Run I would need to connect the cloudSQL manually through Cloud Function -> Cloud Run revision according to docs (bottom part – Gen2). I would like to connect to cloudSQL without the need of setting the connection manually. Is there a way to specify it with gcloud functions deploy
command, just like for cloud run (docs)? I would prefer solution without terraform, but I am open to the terraform version as well.
I have tried to create the connection manually.
Martin Šír is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.