-
Notifications
You must be signed in to change notification settings - Fork 60k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use consistent format for placeholders in Open ID section (#34454)
Co-authored-by: itecompro <[email protected]> Co-authored-by: Alex Nguyen <[email protected]>
- Loading branch information
1 parent
4965bc5
commit cdf24f8
Showing
4 changed files
with
31 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,9 +59,8 @@ The `google-github-actions/auth` action receives a JWT from the {% data variable | |
|
||
This example has a job called `Get_OIDC_ID_token` that uses actions to request a list of services from GCP. | ||
|
||
* `<example-workload-identity-provider>`: Replace this with the path to your identity provider in GCP. For example, `projects/<example-project-id>/locations/global/workloadIdentityPools/<name-of-pool>/providers/<name-of-provider>` | ||
* `<example-service-account>`: Replace this with the name of your service account in GCP. | ||
* `<project-id>`: Replace this with the ID of your GCP project. | ||
* `WORKLOAD-IDENTITY-PROVIDER`: Replace this with the path to your identity provider in GCP. For example, `projects/example-project-id/locations/global/workloadIdentityPools/name-of-pool/providers/name-of-provider` | ||
* `SERVICE-ACCOUNT`: Replace this with the name of your service account in GCP. | ||
|
||
This action exchanges a {% data variables.product.prodname_dotcom %} OIDC token for a Google Cloud access token, using [Workload Identity Federation](https://cloud.google.com/iam/docs/workload-identity-federation). | ||
|
||
|
@@ -86,8 +85,8 @@ jobs: | |
uses: 'google-github-actions/[email protected]' | ||
with: | ||
create_credentials_file: 'true' | ||
workload_identity_provider: '<example-workload-identity-provider>' | ||
service_account: '<example-service-account>' | ||
workload_identity_provider: 'WORKLOAD-IDENTITY-PROVIDER' | ||
service_account: 'SERVICE-ACCOUNT' | ||
- id: 'gcloud' | ||
name: 'gcloud' | ||
run: |- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,10 +124,10 @@ The `hashicorp/vault-action` action receives a JWT from the {% data variables.pr | |
This example demonstrates how to create a job that requests a secret from HashiCorp Vault. | ||
* `<Vault URL>`: Replace this with the URL of your HashiCorp Vault. | ||
* `<Vault Namespace>`: Replace this with the Namespace you've set in HashiCorp Vault. For example: `admin`. | ||
* `<Role name>`: Replace this with the role you've set in the HashiCorp Vault trust relationship. | ||
* `<Secret-Path>`: Replace this with the path to the secret you're retrieving from HashiCorp Vault. For example: `secret/data/production/ci npmToken`. | ||
* `VAULT-URL`: Replace this with the URL of your HashiCorp Vault. | ||
* `VAULT-NAMESPACE`: Replace this with the Namespace you've set in HashiCorp Vault. For example: `admin`. | ||
* `ROLE-NAME`: Replace this with the role you've set in the HashiCorp Vault trust relationship. | ||
* `SECRET-PATH`: Replace this with the path to the secret you're retrieving from HashiCorp Vault. For example: `secret/data/production/ci npmToken`. | ||
```yaml copy | ||
jobs: | ||
|
@@ -141,10 +141,10 @@ jobs: | |
uses: hashicorp/[email protected] | ||
with: | ||
method: jwt | ||
url: <Vault URL> | ||
namespace: <Vault Namespace - HCP Vault and Vault Enterprise only> | ||
role: <Role name> | ||
secrets: <Secret-Path> | ||
url: VAULT-URL | ||
namespace: VAULT-NAMESPACE # HCP Vault and Vault Enterprise only | ||
role: ROLE-NAME | ||
secrets: SECRET-PATH | ||
- name: Use secret from Vault | ||
run: | | ||
|
@@ -156,7 +156,7 @@ jobs: | |
**Note**: | ||
* If your Vault server is not accessible from the public network, consider using a self-hosted runner with other available Vault [auth methods](https://www.vaultproject.io/docs/auth). For more information, see "[AUTOTITLE](/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners)." | ||
* `<Vault Namespace>` must be set for a Vault Enterprise (including HCP Vault) deployment. For more information, see [Vault namespace](https://www.vaultproject.io/docs/enterprise/namespaces). | ||
* `VAULT-NAMESPACE` must be set for a Vault Enterprise (including HCP Vault) deployment. For more information, see [Vault namespace](https://www.vaultproject.io/docs/enterprise/namespaces). | ||
{% endnote %} | ||
|
@@ -180,9 +180,9 @@ jobs: | |
with: | ||
exportToken: true | ||
method: jwt | ||
url: <Vault URL> | ||
role: <Role name> | ||
secrets: <Secret-Path> | ||
url: VAULT-URL | ||
role: ROLE-NAME | ||
secrets: SECRET-PATH | ||
- name: Use secret from Vault | ||
run: | | ||
|
@@ -193,7 +193,7 @@ jobs: | |
if: always() | ||
run: | | ||
curl -X POST -sv -H "X-Vault-Token: {% raw %}${{ env.VAULT_TOKEN }}{% endraw %}" \ | ||
<Vault URL>/v1/auth/token/revoke-self | ||
VAULT-URL/v1/auth/token/revoke-self | ||
``` | ||
## Further reading | ||
|