Reuse Variables¶
Pull a credential or configuration value from a single source once, then expose it under multiple environment-variable names so different tools can each find what they expect.
Example¶
env-alias:
STORAGE_ACCESS_KEY_ID:
source: "~/.config/backup/storage-credentials.ini"
parser: "ini"
selector: "default.accessKeyId"
STORAGE_ACCESS_KEY:
source: "~/.config/backup/storage-credentials.ini"
parser: "ini"
selector: "default.accessKey"
BACKUP_S3_ACCESS_KEY_ID:
value: "env:STORAGE_ACCESS_KEY_ID"
BACKUP_S3_ACCESS_KEY:
value: "env:STORAGE_ACCESS_KEY"
BACKUP_REPOSITORY:
value: "s3:personal-backups:monthly"
Walkthrough:
STORAGE_ACCESS_KEY_IDandSTORAGE_ACCESS_KEYare read once from an INI credentials file usingparser: iniand asection.fieldselector.BACKUP_S3_ACCESS_KEY_IDandBACKUP_S3_ACCESS_KEYcopy those resolved values whole viavalue: 'env:...'. The backup tool sees the naming it expects while the key is still sourced from a single, authoritative place.BACKUP_REPOSITORYis a plainvaluethat does not depend on any credential.
Use this when one secret must satisfy several tools, or when you want a stable canonical source with convenience aliases — change the credential once in the source and every alias picks it up.