sparse-intern-71089
07/10/2020, 8:31 AMbroad-breakfast-39210
07/10/2020, 8:32 AMgreen-school-95910
07/10/2020, 1:29 PMgreen-school-95910
07/10/2020, 1:31 PMhallowed-rain-9096
07/10/2020, 1:42 PMhallowed-rain-9096
07/10/2020, 1:48 PMDatabaseInstance
has a ConnectionName
output property. You need to set an annotation in the cloud run service's Template.Metadata.Annotations
with a key of <http://run.googleapis.com/cloudsql-instances|run.googleapis.com/cloudsql-instances>
and a value of that ConnectionName
property from the database instance. Then (i assume) you'll also need to pass a connection string to your app. In my case, I'm using Postgres, so my app's connection string looks like this (params in curly braces): Host=/cloudsql/{dbStack.CloudSqlConnectionName};Username={dbStack.Username};Password={dbStack.Password};
.green-school-95910
07/10/2020, 1:51 PMhallowed-rain-9096
07/10/2020, 2:01 PMbroad-breakfast-39210
07/13/2020, 2:18 AMbroad-breakfast-39210
07/13/2020, 3:56 AMhallowed-rain-9096
07/13/2020, 1:19 PM