-
Notifications
You must be signed in to change notification settings - Fork 848
postgres/gcppostgres: Add support for private service connect #3670
Open
Description
Is your feature request related to a problem? Please describe.
I am trying to connect a service using gocloud to a Google Cloud SQL instance which has private service connect enabled. However I'm encountering the following error:
Error: error connecting to PostgreSQL server <project_id>:europe-west1:<name> (gcppostgres): dial tcp <private_ip>:3307: connect: connection timed out
I see that gocloud still uses v1 of the cloudsql proxy library and with it the legacy behaviour of connecting to the first IP address returned by the SQL Admin API. I see neither docs nor code mentioning PSC support.
Describe the solution you'd like
It is possible to connect to postgres instances on google cloud using private service connect.
Additional context
The underlying cloudsql proxy library may need to be updated.
To make this non-breaking, go-cloud could default to using the legacy behaviour (--auto-ip flag in CLI) and new features like PSC would be opt-in.
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.