Skip to content

Commit

Permalink
Update GCP CloudSQL Connection documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenepaniot committed Jan 17, 2023
1 parent 2af7c56 commit 4cdaa50
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@ resource "mysql_database" "app" {
}
```

### GCP CloudSQL Connection

For connections to GCP hosted instances, the provider can connect through the Cloud SQL MySQL library.

To enable Cloud SQL MySQL library, add `cloudsql://` to the endpoint `Network type` DSN string and connection name of the instance in following format: `project/region/instance` (or `project:region:instance`).

```hcl
# Configure the MySQL provider for CloudSQL Mysql
provider "mysql" {
endpoint = "cloudsql://project:region:instance"
username = "app-user"
password = "app-password"
}
```

See also: [Authentication at Google](https://cloud.google.com/docs/authentication#service-accounts).

## SOCKS5 Proxy Support

The MySQL provider respects the `ALL_PROXY` and/or `all_proxy` environment variables.
Expand Down

0 comments on commit 4cdaa50

Please sign in to comment.