GCP Cloud Run example with Cloud SQL
An example app using GCP Cloud Run with Cloud SQL.
GCP_PROJECT_ID
https://cloud.google.com/sql/docs/postgres/connect-run
gcloud sql connect
) and create the contacts table:
create table if not exists contacts (
id serial primary key,
name varchar(100),
email varchar(100)
);
INSTANCE_CONNECTION_NAME
(gcloud sql instances describe
).GCP_SQL_CONNECTION_NAME
.user=postgres password=<password> database=postgres host=/cloudsql/<INSTANCE_CONNECTION_NAME>
GCP_SQL_DSN
.GCP_CREDENTIALS
.