DEV Community

Serguey Shinder
Serguey Shinder

Posted on

If You Can't Rebuild It From Code, You Don't Own It

Here's an uncomfortable question to ask about any system you run: if it vanished tomorrow, could you rebuild it exactly, from code, without anyone remembering the manual steps? For a lot of infrastructure I've encountered, the honest answer is no. And if the answer is no, you don't really own that system. You're just borrowing it until the day it breaks.

The problem is the server that was set up by hand, tuned over months by whoever happened to be on call, and never written down. It works, so nobody touches it. But nobody can confidently recreate it either. Its real configuration lives partly in files, partly in someone's memory, and partly in accidents nobody understands. That machine isn't an asset. It's a liability with good uptime, waiting for the reboot that doesn't come back clean.

Infrastructure as code is the discipline that fixes this, and its value isn't really about automation or speed, though you get those. Its value is that the definition of your system becomes something explicit, reviewable, and reproducible. The environment is described in files you can read, version, and run again to get the same result. What was tribal knowledge becomes something the whole team can see and trust.

The test I've learned to apply is deliberately harsh: could I destroy this environment and stand it back up from what's committed in the repository? If yes, I understand the system completely, because its full truth is written down. If no, then some critical part exists only as an undocumented manual step or a setting someone changed once and forgot, and that gap is exactly where the next disaster will find me.

This matters most on the day everything goes wrong. When a system is defined as code, recovery is a process you can run and, ideally, have practiced. When it exists only as a hand-built machine full of undocumented tweaks, recovery is an archaeology project conducted under maximum pressure while the business waits. One of those is a controlled operation. The other is a prayer. If you can't rebuild it from code, you don't own your infrastructure — it owns you.

– Serguey Shinder

Top comments (0)