Infrastructure Should Be Rebuildable
If I built it once, I should be able to build it again.
Imagine a critical server suddenly disappears, perhaps because of hardware failure, accidental deletion, or a planned migration. How long would it take you to rebuild it? If your answer is, “First, I need to remember how I originally configured it,” you have a fundamental infrastructure problem.
The Manual Setup Problem
Setting up a server manually is easy at first: you provision the instance, SSH in, and start running commands like:
apt update
apt install docker
apt install nginx
From there, you manually configure users, directories, firewall rules, and certificates until everything finally works. Six months later, however, when someone needs to rebuild that server, your documentation becomes nothing more than a collection of vague memories, recalling an unrecorded Nginx tweak, a forgotten package installation, or a random permissions fix. When the server itself becomes the only true source of documentation, your infrastructure is a liability.
Describe the Infrastructure
Instead of depending on manual steps, I prefer infrastructure to describe how it should be built. For example, Terraform can describe the infrastructure:
Network
↓
Server
↓
Firewall
↓
Storage
Ansible can describe how the server should be configured:
Server
↓
Install packages
↓
Configure Docker
↓
Create users
↓
Configure services
Then the application deployment process handles getting the application running. The exact tools can change, but the important part is that the process is repeatable.
The Real Test
A useful question to ask about any infrastructure is: “Could another engineer rebuild this without me?” If recreating an environment depends entirely on knowledge trapped in someone’s head, that environment is inherently fragile. However, when the entire process is explicitly defined in code and configuration, any engineer can inspect it to understand the required resources, machine configurations, active services, and deployment steps, making recovery infinitely easier.
Automation Is More Than Speed
While infrastructure automation is often praised for its deployment speed, its primary benefit is consistency. When you configure multiple servers manually, small discrepancies inevitably creep in, whether it is a mismatched package version, an undocumented configuration change, or a missing firewall rule. Automation eliminates this variance by letting you run the exact same instructions repeatedly across every environment.
Infrastructure Code
↓
Server A
Server B
Server C
The environments become easier to understand and maintain.
Rebuilding Should Be Normal
Because infrastructure will eventually change, servers get replaced, clusters upgrade, and environments fluctuate. A rebuild should never feel like an emergency. Instead, the system must be designed to accommodate change by default. This does not mean you have to recreate every environment in five minutes; rather, it means the essential knowledge required to rebuild them must exist somewhere other than a team member’s memory.
The Lesson
Good infrastructure does not just work today; it must also be easy to understand, reproduce, and recover tomorrow. While tools like Terraform and Ansible help us achieve this, the technology itself is not the main point. The underlying principle is much simpler: if you built it once, you should be able to build it again.