IaC Modernization & How to Future-Proof Your Infrastructure
· via Spacelift
Why this matters now: “Modernize” usually arrives as a mandate with no sequence attached, and this piece gives the sequence: nine steps from inventory to agentic AI. AI-generated infrastructure code is multiplying faster than most estates were built to absorb, so the order of operations now matters more than any single tool choice. The article treats modernization as a continuous practice, and that framing matches what I keep seeing in real Terraform estates.
Three takeaways:
- Import what exists and enforce code-first changes before any tooling decision. The roadmap starts with an inventory of what actually runs, brings unmanaged resources under version control, and only then standardizes naming, tagging and modular components. The target state is explicit in the article’s traits list: everything codified, modules versioned in a registry, and remote state with locking, split by lifecycle. Skipping the inventory is how modernization efforts stall halfway.
- Break up monolithic state by lifecycle and ownership before automating delivery. Smaller states plan faster and localize the blast radius of a mistake. A common pattern is one stack per environment per logical layer: networking, data, application. That split makes the later steps workable: GitOps pipelines, policy gates with OPA, drift detection with a remediation strategy, and self-service golden paths on top of the guardrails. Policies can warn on minor issues and hard-fail on serious ones, with approvals gating production changes and deletions.
- Bring AI in last, once those guardrails exist. Treat agent-written changes like human ones: planned, policy checked and reviewed before apply. Give agents least-privilege credentials, separate the systems that propose changes from the ones that approve them, and keep a human in the loop for production. Bet on open standards such as OpenTofu, OPA and OCI registries, because no single tool covers every need.
What I’d add today: Start planning and preparing your infrastructure for onboarding AI workloads and agents.
Who should read it: teams with an aging Terraform estate, and platform leads deciding where AI fits into infrastructure work. If the guardrails already exist in your setup, IaC testing is the natural next layer before handing more of the workflow to agents.