Skip to content

Commit

Permalink
internal/docs: update docs for GCP/gcloud's application default crede…
Browse files Browse the repository at this point in the history
…ntials (#2984)
  • Loading branch information
prateekj117 committed Apr 3, 2021
1 parent db7a6e7 commit 6f954e2
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions internal/admin/README.md
Expand Up @@ -3,7 +3,7 @@
This is a [Terraform][] configuration for the Go CDK open source project. It
manages GitHub ACLs, issue labels, and the module proxy buckets on GCS. To apply
the configuration to the project's resources, [sign into the gcloud
CLI][gcloud auth login], grab a [GitHub access token][], and then do the
CLI][gcloud auth application-default login], grab a [GitHub access token][], and then do the
following:

```bash
Expand All @@ -12,6 +12,6 @@ internal/admin$ terraform init
internal/admin$ terraform apply
```

[gcloud auth login]: https://cloud.google.com/sdk/docs/authorizing#running_gcloud_auth_login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login
[GitHub access token]: https://github.com/settings/tokens/new?scopes=repo
[Terraform]: https://www.terraform.io/
4 changes: 2 additions & 2 deletions internal/website/content/howto/blob/_index.md
Expand Up @@ -158,12 +158,12 @@ you would see in the [`gsutil`][] CLI.
[`gsutil`]: https://cloud.google.com/storage/docs/gsutil

`blob.OpenBucket` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample "gocloud.dev/blob/gcsblob.Example_openBucketFromURL" >}}

Expand Down
4 changes: 2 additions & 2 deletions internal/website/content/howto/docstore/_index.md
Expand Up @@ -258,12 +258,12 @@ Firestore URLs provide the project and collection, as well as the field that
holds the document name.

`docstore.OpenCollection` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample
"gocloud.dev/docstore/gcpfirestore.Example_openCollectionFromURL" >}}
Expand Down
4 changes: 2 additions & 2 deletions internal/website/content/howto/pubsub/publish.md
Expand Up @@ -97,12 +97,12 @@ project ID and the topic ID.
[Cloud Pub/Sub]: https://cloud.google.com/pubsub/docs/

`pubsub.OpenTopic` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample "gocloud.dev/pubsub/gcppubsub.Example_openTopicFromURL" >}}

Expand Down
4 changes: 2 additions & 2 deletions internal/website/content/howto/pubsub/subscribe.md
Expand Up @@ -106,12 +106,12 @@ The URLs use the project ID and the subscription ID.
[Cloud Pub/Sub]: https://cloud.google.com/pubsub/docs/

`pubsub.OpenSubscription` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample "gocloud.dev/pubsub/gcppubsub.Example_openSubscriptionFromURL" >}}

Expand Down
8 changes: 4 additions & 4 deletions internal/website/content/howto/runtimevar/_index.md
Expand Up @@ -126,12 +126,12 @@ the `runtimevar.OpenVariable` function as shown in the example below.
[GCP Runtime Configurator]: https://cloud.google.com/deployment-manager/runtime-configurator/

`runtimevar.OpenVariable` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample
"gocloud.dev/runtimevar/gcpruntimeconfig.Example_openVariableFromURL" >}}
Expand All @@ -153,12 +153,12 @@ the `runtimevar.OpenVariable` function as shown in the example below.
[GCP Secret Manager]: https://cloud.google.com/secret-manager

`runtimevar.OpenVariable` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample
"gocloud.dev/runtimevar/gcpsecretmanager.Example_openVariableFromURL" >}}
Expand Down
4 changes: 2 additions & 2 deletions internal/website/content/howto/secrets/_index.md
Expand Up @@ -167,12 +167,12 @@ similar to [key resource IDs][].
[key resource IDs]: https://cloud.google.com/kms/docs/object-hierarchy#key

`secrets.OpenKeeper` will use Application Default Credentials; if you have
authenticated via [`gcloud auth login`][], it will use those credentials. See
authenticated via [`gcloud auth application-default login`][], it will use those credentials. See
[Application Default Credentials][GCP creds] to learn about authentication
alternatives, including using environment variables.

[GCP creds]: https://cloud.google.com/docs/authentication/production
[`gcloud auth login`]: https://cloud.google.com/sdk/gcloud/reference/auth/login
[`gcloud auth application-default login`]: https://cloud.google.com/sdk/gcloud/reference/auth/application-default/login

{{< goexample "gocloud.dev/secrets/gcpkms.Example_openFromURL" >}}

Expand Down

0 comments on commit 6f954e2

Please sign in to comment.