Config Access
The config is not an afterthought. It is not "the messy bits you throw in a JSON file." In a cloud-native, DevOps-driven world, configuration is your infrastructure.
"Config" (short for configuration) refers to settings or parameters that control how software, systems, or devices behave. Configs enable customization without changing code, support different environments (development, staging, production), and make systems reproducible and maintainable. config
| Anti-pattern | Why it hurts | Fix | |--------------|--------------|-----| | | 10 different files for the same service | Single source of truth (e.g., config.env.toml ) | | Magic strings | "DB_HOST" typo crashes production | Use typed config objects + validation | | Copy-paste environments | Dev → Staging → Prod drift | Hierarchical overrides (e.g., HOCON, viper) | | Binary config (e.g., *.db ) | Can’t diff, can’t review, can’t version | Move to declarative text formats | | No defaults | Each deploy requires guessing 20 vars | Define defaults, override per environment | The config is not an afterthought
| Purpose | Tools | |--------|-------| | Local dev | dotenv , direnv , config-rs | | Secrets | HashiCorp Vault, AWS Secrets Manager, Doppler | | Distributed config | Consul, etcd, ZooKeeper | | App config | Spring Cloud Config, Apollo | | CLI helpers | argparse , click , cobra , yargs | Configs enable customization without changing code
That night, Marco doesn't think. He just acts.