tech, developers, and the code underneath

issue 242· essay·

The config that only exists in production

Every system has settings that were never written down, only typed once. They are the reason staging passes and production does not.

Somebody set it in a console three years ago. It works. Nobody knows it exists.

This is the most common cause of the sentence "but it works in staging," and it is not a discipline problem so much as a gravity problem. Configuration set through a UI or a one-off command has no natural home in a repository, so it does not end up in one.

where it hides#

Cloud console toggles. A load balancer idle timeout, an S3 lifecycle rule, a security group edited during an incident and never reverted.

Database settings. work_mem raised for one bad query in 2024. A statement timeout set on the role, not in the connection string. Autovacuum tuned per table.

DNS. TTLs, CNAME chains, and a health check pointing at a path that was renamed.

The environment variables that are not in the manifest. Injected by a platform layer, a base image, or an init container.

Feature flags. The most honest configuration in most systems, and the least reviewed. A flag at 100% for two years is not a flag, it is a branch you have not deleted.

Certificates and their renewal path. Not config exactly, but the same property: hand-managed, invisible, and load-bearing.

why "just use IaC" is not the whole answer#

Infrastructure as code fixes the authoring problem. It does not fix drift, because drift happens after the apply. Someone will still click something at 2am, and they should — that is what the console is for during an incident.

The realistic goal is not "nobody ever touches production by hand." It is every hand-touch is detected within a day.

the drift check#

Run a plan on a schedule and alert on non-empty output:

bash
terraform plan -detailed-exitcode -lock=false
# 0 = no changes, 1 = error, 2 = drift

Exit code 2 is the interesting one. Wire it to a low-urgency alert, not a page. The point is a running list of "things that differ from the file," reviewed weekly, either codified or reverted.

The same idea works without Terraform. Any describe/get call that you can diff against a checked-in expectation is a drift check. A twenty-line script that dumps your security group rules to JSON and diffs against a committed file will find more real problems than most linters.

the reconciliation ritual#

Once a quarter, pick one subsystem and reconcile it end to end:

  1. Dump the live configuration.
  2. Diff against what the repository claims.
  3. For each difference, decide: codify, revert, or document why it is deliberate.
  4. Delete any flag that has been at 0% or 100% for more than two quarters.

It takes an afternoon and it repeatedly turns up things nobody could have guessed. The value is not the diff. It is that the diff shrinks over time, and a shrinking diff is a system you can reason about.

the test#

Here is the question that tells you where you are:

If this environment were destroyed, could you rebuild it from the repository alone — and would anyone be able to tell the difference?

If the honest answer involves "and then we'd have to remember to...", the things after "remember to" are your undocumented config. Write them down today; codify them when you can.

get README in your inbox

One dispatch, no noise. Tech and developer news, plus the occasional long piece on the craft.

subscribe →