Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CDS-103303] TAS Command Step - Cannot Utilize Harness Secrets #9027

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ To export variables from the script to other steps in the stage, you use the **O
The following variable types are supported:

- String
- Secret

Output variables are passed from the the script output to the Harness pipeline and can be referenced in subsequent steps and settings using expressions.

Expand Down Expand Up @@ -116,6 +117,16 @@ If you exit from the script (`exit 0`), Harness does not populate the output var

:::

You can access a secret configured in the **Secrets Manager** using an expression. For example, `<+secrets.getValue('SECRET_NAME')>`.

You can also configure variables of type Secret as output variables. When an output variable is configured as a secret, its value is encrypted.

![](static/tanzu-secrets-output-variable.png)

The encrypted secret is decrypted and made available for use in the script. However, the script's output will not display the secret, even if the secret is explicitly passed to the output stream.

![](static/output-variable-logs.png)

### Using manifests in your scripts

In order to use defined manifests in the Service in Tanzu command script you have to use a special expression `${service.manifest}`
Expand Down
Loading