Infrastructure-as-Code for Government: Why It Matters and How to Start
Government IT infrastructure has a documentation problem. Not for lack of policy — federal programs have no shortage of documentation requirements — but because the documentation that matters most, the precise configuration of running systems, rarely matches reality. Systems are built once, then modified incrementally by successive teams through vendor portals, SSH sessions, and configuration files edited in place. The person who knew why a particular setting was chosen left two years ago. The system works, approximately, until it does not.
Infrastructure-as-Code (IaC) is the practice of defining infrastructure in version-controlled source code. Virtual machines, networks, storage, firewall rules, and service configurations are described in declarative files that can be read, reviewed, tested, and applied deterministically. When the code is applied, the infrastructure matches it exactly. When the infrastructure needs to change, the code changes first.
What IaC Actually Is
IaC tools operate in two broad styles. Declarative tools — Terraform and its OpenTofu fork are the most widely used — describe the desired end state; the tool determines what changes are required and applies them. Imperative tools like Ansible describe steps rather than end state. Most mature programs use both: Terraform to provision resources, Ansible to configure the software running on them. Pulumi and Crossplane see increasing use in DevSecOps-mature environments. The specific tooling matters less than the discipline: all changes happen through code, all code changes happen through version control, and no infrastructure exists outside the repository.
The Government-Specific Problems IaC Solves
For commercial organizations, IaC is primarily a developer productivity story. For government programs, the value is concentrated in three areas that matter more directly to program managers and auditors than to individual engineers.
Auditability. Every infrastructure change in an IaC-managed environment is a code commit. Commits carry authorship, timestamps, and change descriptions. When an auditor asks when a firewall rule was added and who approved it, the answer is in the version control history. When a security review requires a list of every configuration change in the past year, that list is a git log. Manual infrastructure changes are inherently undocumentable at this level of precision — the documentation is always written after the fact, if at all.
Environment Reproducibility. A documented IaC repository is not just documentation — it is executable documentation. The development environment, the staging environment, and the production environment are all produced from the same code base. If a production environment is destroyed or corrupted, it can be rebuilt exactly from the repository. Disaster recovery becomes a deterministic process rather than a reconstruction effort. For programs with continuity-of-operations requirements, this distinction is significant.
Reduced Vendor Dependency. Infrastructure defined in portable IaC code is an asset the organization owns — not configuration locked inside a vendor portal, accessible only through their interface, exportable only in proprietary formats. A team transition, a vendor change, or a contract rebid does not require reconstructing the environment from institutional memory.
What IaC Enables Operationally
Beyond compliance benefits, IaC changes the operational tempo of infrastructure work. A new environment — for a new contract, a disaster recovery test, or a multi-site program deployment — that would take weeks to build manually can be produced in hours from an existing IaC foundation. CI/CD pipelines that include infrastructure changes bring software-development review discipline to infrastructure: a pull request triggers a plan, shows proposed changes, and applies them on merge. Rollback is a commit revert.
Common Objections and the Reality
The most frequent objection to IaC adoption in government programs is a staffing concern: "We do not have engineers who know Terraform." This objection inverts the actual relationship between IaC and expertise. Manual infrastructure management requires deep, program-specific knowledge that is difficult to transfer and impossible to review. IaC codifies that knowledge in readable files. A new engineer joining a program can read the repository and understand the infrastructure. The expertise floor for operational handoffs goes down, not up.
The second common objection is complexity: "Our environment is too complex for IaC." IaC is most valuable in complex environments. Simple environments can survive manual management. Complex environments — with many services, multiple network segments, strict security controls, and overlapping compliance requirements — are precisely the environments where undocumented manual configuration becomes operationally hazardous. The complexity is not an argument against IaC; it is the argument for it.
A Realistic Adoption Path
The most reliable path is not a migration — it is a parallel start. Begin with the next new environment that needs to be built. Build it entirely through IaC from the first resource. Establish the state backend before writing the first resource definition: for Terraform, this means a remote state store with locking. This is the step most programs skip and the one that causes the most problems later. Pick one tool and use it consistently — partially IaC-managed infrastructure is nearly as hard to reason about as manually managed infrastructure.
Once the new environment is running, migrate the existing environment incrementally: import resources into state, document their configuration in code, and from that point forward treat the code as authoritative.
Wilkes & Liberty's Sabal Infrastructure Platform formalizes this approach for defense and government programs. It provides the IaC foundation, the state management architecture, and the operational runbooks required to manage sovereign infrastructure environments from day one — without requiring programs to build that discipline from scratch under operational pressure.