tfcensus config
Configuration is layered; later layers win:
text
defaults < user file < project file < env (TFCENSUS_*) < flags
User file: $XDG_CONFIG_HOME/tfcensus/config.yaml (~/.config/tfcensus/config.yaml)
Project file: .tfcensus.yaml, found by walking up from the working directory to the git root
Env vars: TFCENSUS_<KEY> with dots and dashes as underscores, e.g. TFCENSUS_CACHE_TTL=30m.
Use __ to mark nesting explicitly (TFCENSUS_DISCOVERY__GENERATE_STACKS=true).
Only scalars and string lists can be set; lists are comma-separated.
Maps and lists of objects need a file. An unknown TFCENSUS_* variable is
ignored with a warning.Unknown keys and wrong types are errors (exit 2), reported with file:line:column. 'tfcensus config init' writes a commented file to start from. Every key, its default and its variable are listed at https://tfcensus.sasskovacs.dev/reference/config.
Usage
sh
tfcensus config <command>The global flags work with every command.
Examples
sh
tfcensus config init
tfcensus config show --sources
tfcensus config validate .tfcensus.yamlSubcommands
| Command | Description |
|---|---|
| tfcensus config init | Write a commented config file |
| tfcensus config path | Print the config file locations tfcensus reads |
| tfcensus config show | Print the effective configuration |
| tfcensus config validate | Validate config files against the schema |