The Env Catalog Is a Repository Artifact
59 variables, generated not written - and drift fails the build. ๐ I'm Anton - a software engineer working mostly in PHP/Symfony and Go, currently carving a live PHP monolith into Go services. Part 1 of this series was about the service manifest: one declaration that the runtime reads instead of a pile of wiring code. This part is about the file that falls out of that declaration - the catalogโฆ
The Env Catalog is a generated file in a PHP/Symfony and Go service repository. It lists all environment variables the service uses, sourced from either the platform library or the service's own configuration. The catalog is not documentation but an artifact that fails the build if it no longer matches the code. At 59 variables, the service's README becomes unreliable; any changes to the variables require updating the catalog.
The catalog file is YAML and starts with a comment stating it's automatically generated and should not be edited. It contains six fields per variable: name, source, catalog, defined_in, required, secret, and help. The source field indicates whether the variable is from the platform or the service's own config. The catalog provides a record of which variables must never appear in logs, making it more useful than prose rules.
The CI job runs the generator in check mode to detect any drift, failing the build if a mismatch is found.
Written by urgent.news from Dev.to's reporting โ not their text. Machine-written โ may contain errors; check the original before relying on it.