ti fs-vault read-secret
Reads a complete secret or one field using an owner or delegated credential.
Syntax
ti fs-vault read-secret
--secret-name <string>
[--field <string>]
[--file-system-id <string>]
[--format <string>]
[--fs-token <string>]
[--help]
[--vault-token <string>]
[--version]
Options
--secret-name <string>: Vault secret name. [required]--field <string>: Optional field name to read.--file-system-id <string>: Select the file system. You can also setTI_FS_FILE_SYSTEM_ID.--format <string>: Read output format:json,raw, orenv. [default: json]--fs-token <string>: Set the file system user token. If omitted, usesTI_FS_TOKEN.--help: Display help information.--vault-token <string>: Delegatedti fs-vaulttoken; preferTI_VAULT_TOKEN.--version: Display version information.
For options shared by all commands, see Global options.
Examples
Read one secret field as raw text:
# Write only the selected field value for direct consumption by a process. ti fs-vault read-secret --file-system-id <file-system-id> --secret-name db-prod --field PASSWORD --format rawFormat a field as an environment assignment:
# Emit an exportable environment-variable representation of the field. ti fs-vault read-secret --file-system-id <file-system-id> --secret-name db-prod --field DB_URL --format envRead with a delegated Vault token:
# Access only the scope granted to an agent without using the owner token. ti fs-vault read-secret --file-system-id <file-system-id> --secret-name db-prod --field DB_URL --vault-token "$TI_VAULT_TOKEN" --format raw