Search code examples
postgresqlgoogle-cloud-platformgoogle-kubernetes-enginegoogle-cloud-sql

database connection URI string for GCP cloudsql postgres database?


What is the format for database connection URI string for a GCP cloudsql postgres database. The instance only has private access and the connection URI string is needed for a workload running on GKE in the same region. Can't find anything concrete.


Solution

  • Database connection URI string for Cloud Sql postgres database would be as follows

    postgres://<user\\\>:<password\\\>@<ip-address\\\>:<port\\\>/<database-name\\\>.

    Also you can check this document and this thread