Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Acconut authored Nov 26, 2024
1 parent f9847ef commit b01f913
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmd/tusd/cli/composer.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ func CreateComposer() {
"Please remove underscore from the value", Flags.GCSObjectPrefix)
}

// Legacy: account file used to be provided by GCS_SERVICE_ACCOUNT_FILE environment variable.
// Now it is more common to default into ADC discovery mechanism.
// Application Default Credentials discovery mechanism is attempted to fetch credentials,
// but an account file can be provided through the GCS_SERVICE_ACCOUNT_FILE environment variable.
gcsSAF := os.Getenv("GCS_SERVICE_ACCOUNT_FILE")

service, err := gcsstore.NewGCSService(gcsSAF)
Expand Down
3 changes: 2 additions & 1 deletion docs/_storage-backends/google-cloud-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ $ tusd -gcs-bucket=my-test-bucket.com
...
```

By default, Application Default Credentials [discovery mechanism](https://cloud.google.com/docs/authentication/external/set-up-adc) will be attempted.
By default, [Application Default Credentials discovery mechanism](https://cloud.google.com/docs/authentication/external/set-up-adc) will be attempted.

If `GCS_SERVICE_ACCOUNT_FILE` environment variable is provided, that account will be used instead:

```bash
Expand Down

0 comments on commit b01f913

Please sign in to comment.