Open noonessh opened 4 months ago
If you run ./cloud-sql-proxy --help
, there's a section in the message that explains this.
See https://github.com/GoogleCloudPlatform/cloud-sql-proxy/blob/136595b0dbc996b2ed5703e5c2cc4d9d0b80ed40/cmd/root.go#L223-L247 for the message.
@enocom As far as I could find in the docs, there is no available env var for passing auth tokens when using the --auto-iam-authn
switch (if it's possible, but missing in the docs, I'll be happy to send a PR).
This would be super useful, specially for Docker scenarios. It could even automatically assume --auto-iam-auth
switch if present for extra convenience.
Would this be an acceptable PR to merge? (I can track this by filing a separate issue, if desired)
Do you mean CSQL_PROXY_AUTO_IAM_AUTHN
? That is supported. Otherwise, there's not a way to manually provide OAuth2 tokens.
No, not that one, which just maps to --auto-iam-authn
.
I had to dig a bit in the repo to confirm that the env var mapped to that switch, as it's not in the docs (fixed by #2264).
What I'd like to pass as env vars are values for --login-token
and --token
switches, as they're needed when using --auto-iam-authn
.
Description
Documentation mentions: The Cloud SQL Auth Proxy has support for: Configuration with environment variables
However I can't seem to find any details on what exactly the names of environment variables should be?
Potential Solution
No response
Additional Details
No response