@@ -94,6 +94,23 @@ The following commands may help you retrieve the different values:
-`gcloud iam workload-identity-pools list --location=global --format="value(name)"` will list you POOL_IDs available on your `GCP_PROJECT`
-`gcloud iam workload-identity-pools providers list --workload-identity-pool=<my-pool> --location=global --format="value(name)"` will return the list of available `PROVIDER_ID` for one `POOL_ID`
The template supports two ways to retrieve the JSON web token (JWT):
* using GitLab's `CI_JOB_JWT_V2` variable - _default_<br/>
:warning: deprecated, scheduled to be removed in GitLab 16.5
* using an [ID token](https://docs.gitlab.com/ee/ci/yaml/index.html#id_tokens) named `GCP_JWT` - _configurable_
The ID token can be configured as follows in your `.gitlab-ci.yml` file:
```yaml
# enable GCP_JWT ID token for GCP jobs only
.gcp-base:
id_tokens:
GCP_JWT:
# use your own audience url here
aud:https://gitlab.com
```
### Deployment context variables
In order to manage the various deployment environments, this template provides a couple of **dynamic variables**
...
...
@@ -447,6 +464,23 @@ With:
| `secret_path` (_path parameter_) | this is your secret location in the Vault server |
| `field` (_query parameter_) | parameter to access a single basic field from the secret JSON payload |
The variant supports two ways to retrieve the JSON web token (JWT):
* using GitLab's `CI_JOB_JWT` variable - _default_<br/>
:warning: deprecated, scheduled to be removed in GitLab 16.5
* using an [ID token](https://docs.gitlab.com/ee/ci/yaml/index.html#id_tokens) named `VAULT_JWT_TOKEN` - _configurable_
The ID token can be configured as follows in your `.gitlab-ci.yml` file:
```yaml
# enable VAULT_JWT_TOKEN ID token for GCP jobs only