Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Describe environment variable configuration in the README. #2264

Merged
merged 5 commits into from
Nov 21, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 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,22 @@ 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:
hessjcg marked this conversation as resolved.
Show resolved Hide resolved

```shell
CSQL_PROXY_AUTO_IAM_AUTHN=true \
./cloud-sql-proxy my-project:us-central1:my-db-server
hessjcg marked this conversation as resolved.
Show resolved Hide resolved
```

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
Loading