tw secrets
Manage secrets
Run tw secrets -h to view supported workspace secret operations.
Secrets are used to store the keys and tokens used by workflow tasks to interact with external systems, such as a password to connect to an external database or an API token.
tw secrets list
List secrets
tw secrets list [OPTIONS]
Options
| Option | Description | Required | Default |
|---|---|---|---|
-w, --workspace | Workspace numeric identifier or reference in OrganizationName/WorkspaceName format (defaults to TOWER_WORKSPACE_ID environment variable) | No |
tw secrets add
Add a secret
tw secrets add [OPTIONS]
Options
| Option | Description | Required | Default |
|---|---|---|---|
-n, --name | Secret name. Must be unique per workspace. Names consist of alphanumeric, hyphen, and underscore characters. | Yes | |
-w, --workspace | Workspace numeric identifier or reference in OrganizationName/WorkspaceName format (defaults to TOWER_WORKSPACE_ID environment variable) | No | |
-v, --value | Secret value, to be stored securely. The secret is made available to pipeline executions at runtime. | No | |
--overwrite | Overwrite the secret if it already exists | No | false |
Run tw secrets add -h to view the required and optional fields for adding a secret.
tw secrets delete
Delete a secret
tw secrets delete [OPTIONS]
Options
| Option | Description | Required | Default |
|---|---|---|---|
-w, --workspace | Workspace numeric identifier or reference in OrganizationName/WorkspaceName format (defaults to TOWER_WORKSPACE_ID environment variable) | No | |
-i, --id | Secret identifier | Yes | |
-n, --name | Secret name | Yes |
tw secrets view
View secret details
tw secrets view [OPTIONS]
Options
| Option | Description | Required | Default |
|---|---|---|---|
-w, --workspace | Workspace numeric identifier or reference in OrganizationName/WorkspaceName format (defaults to TOWER_WORKSPACE_ID environment variable) | No | |
-i, --id | Secret identifier | Yes | |
-n, --name | Secret name | Yes |
tw secrets update
Update a secret
tw secrets update [OPTIONS]
Options
| Option | Description | Required | Default |
|---|---|---|---|
-w, --workspace | Workspace numeric identifier or reference in OrganizationName/WorkspaceName format (defaults to TOWER_WORKSPACE_ID environment variable) | No | |
-v, --value | New secret value, to be stored securely. The secret is made available to pipeline executions at runtime. | No | |
-i, --id | Secret identifier | Yes | |
-n, --name | Secret name | Yes |