Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /