Expand description
Pull configuration — parsing .tsafe.yml / .tsafe.json repo manifests.
A pull config file declares one or more PullSources (Azure Key Vault,
HashiCorp Vault, 1Password) that tsafe pull reads secrets from. The file
is searched upward from the current directory via find_config.
§ADR-012 fields
Every source entry may declare two optional fields defined by ADR-012:
name: a label used by--source <label>filtering. Sources without anamefield are always included in unfiltered runs but cannot be selected with--source.ns: a namespace prefix applied to every key fetched from this source. A key namedDB_PASSWORDfrom a source withns: prodis stored asprod.DB_PASSWORD. The separator is., matching the vault’s existing namespace convention.
§HCP Vault auth fields (task E2.4)
The hcp source variant supports two authentication methods via the auth
sub-key:
# Token auth (legacy default — reads VAULT_TOKEN env var at runtime):
pulls:
- source: hcp
auth:
method: token
# AppRole auth (machine identity):
pulls:
- source: hcp
auth:
method: approle
role_id: my-role
secret_id: ${VAULT_SECRET_ID} # env var expansion supportedNamespace support (HCP Vault Enterprise):
pulls:
- source: hcp
vault_url: https://vault.example.com:8200
vault_namespace: team-alphaStructs§
- Pull
Config - Top-level pull configuration parsed from
.tsafe.ymlor.tsafe.json.
Enums§
- Pull
Source - A single pull source definition.
- Vault
Auth Config - Authentication method declared in the pull manifest for a HashiCorp Vault source.
Functions§
- expand_
env_ var_ str - Expand a single
${VAR_NAME}placeholder ins. - find_
config - Search upward from
startfor.tsafe.yml/.tsafe.json. - load
- Parse a pull configuration file (YAML or JSON).