Skip to content

Commit

Permalink
docs: Describe environment variable configuration in the README. (#2264)
Browse files Browse the repository at this point in the history
Fixes #2263
  • Loading branch information
hessjcg authored Nov 21, 2024
1 parent dc0c5b9 commit 5f9cfe0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The Cloud SQL Auth Proxy has support for:
- [HTTP Healthchecks][health-check-example]
- Service account impersonation
- Separate Dialer functionality released as the [Cloud SQL Go Connector][go connector]
- Configuration with environment variables
- Configuration with [environment variables](#config-environment-variables)
- Fully POSIX-compliant flags

If you're using Go, Java, Python, or Node.js, consider using the corresponding Cloud SQL
Expand Down Expand Up @@ -373,6 +373,24 @@ debug-logs = true

Run `./cloud-sql-proxy --help` for more details.

### Config environment variables

The proxy supports configuration through environment variables.
Each environment variable uses "CSQL_PROXY" as a prefix and is
the uppercase version of the flag using underscores as word delimiters.

For example, the `--auto-iam-authn` flag may be set with the environment variable
`CSQL_PROXY_AUTO_IAM_AUTHN`.

An invocation of the Proxy using environment variables would look like the following:

```shell
CSQL_PROXY_AUTO_IAM_AUTHN=true \
./cloud-sql-proxy <INSTANCE_CONNECTION_NAME>
```

Run `./cloud-sql-proxy --help` for more details.

### Configuring a Lazy Refresh

The `--lazy-refresh` flag configures the Proxy to retrieve connection info
Expand Down

0 comments on commit 5f9cfe0

Please sign in to comment.