#101 - Infrastructure as Code in 2026: Still Essential or Already Changing?
Shared modules turn logging, encryption and blocked public access into defaults developers can reuse.
17 min read
Six years after the podcast first covered infrastructure as code, what still holds up and what does not? The hosts revisit IaC through a 2026 lens: platform teams shipping secure-by-default modules, stacks becoming standard, GitOps making more sense for Kubernetes, and AI raising new questions instead of removing old ones. It is a practical look at where infra tooling is heading and what teams should stop assuming.
Six years in, and we are still moving teams off the console
We recently moved a couple of customers from manually provisioned infrastructure into code. In 2026. If you assumed that argument was settled years ago, it isn’t: click-ops is still how plenty of customer organisations run, and we have watched it go on for years in some of them. The opposite reflex is alive too, teams who have infrastructure as code and want out because they find keeping state in sync painful.
Infrastructure as code was the first thing this show ever covered, in February 2020. Six years on, the definition hasn’t moved and the practice around it has. Shared modules were already there in 2020: HashiCorp launched the public registry in September 2017 and a private one for Terraform Enterprise in February 2018. What changed is how much weight they now carry, with platform teams shipping secure-by-default primitives where a standards document used to sit. Stacks became a unit you deploy. And there is a question the 2020 episode never had to answer: if an agent can write the Terraform and call the cloud API itself, what is the code still for?
The code is there for the humans, and that is the part agents don’t remove.
Provisioning and configuration management are different jobs
Start with the mechanism, because every argument about what counts comes back to it.
Is Ansible infrastructure as code?
It depends which job you point it at, and that’s where we don’t agree.
The loop underneath all of it is simple, and unchanged since 2020. You configure something that exposes an API. You write your intent in a text file. A tool translates that text into API calls against the provider, usually a cloud, sometimes a DNS provider like Cloudflare, sometimes an on-premise hypervisor.
Paulina counts server configuration in: different tool set, same recipe idea, and the cloud is just where the term got popular. Andrey draws the line at the state. When a state-backed tool applies, it does a three-way comparison: what your spec says, what the state recorded last time, and what the provider reports is actually there. Then it shows you a diff before it changes anything.
The line isn’t as clean as that sounds. Ansible ships modules that create cloud resources, and its check mode is documented as a drift test. Both families provision, and both can tell you something has moved. What differs is the record each one keeps and what it compares against. Plenty of teams run both, and for anything created through a cloud API the state-backed tools are what people reach for.
Rotate the machines, or inherit a snowflake
Whichever family you argue for, the failure they share is drift, and it’s what most estates are actually fighting.
What limits configuration drift?
Rebuilding instances from an image on a schedule, which clears local changes each time an instance is replaced.
A configuration management run touches the part of a VM it manages and leaves the rest outside anyone’s supervision. Someone logs in, fixes something by hand, writes nothing down, and the drift accumulates until you have a snowflake: a box nobody can explain, running something critical, that everybody is afraid to touch.
Immutable infrastructure is the way out where the workload allows it. Build a golden image with Packer, deploy copies, and never change a running one. To make a change you build a new image and replace the instances. That bounds how long a hand-made change survives. It doesn’t stop one from doing damage while it’s live, and it only works where the workload tolerates being replaced.
Where VMs are still in the picture, we try to rotate them weekly on client estates, so the only lasting route to a change is the Packer config. There’s no easy tool for that, so it’s something you implement rather than switch on.
In bigger organisations we mostly haven’t seen it land. There’s an EC2 instance somebody has been changing by hand, and the moment you propose redeploying it you get a scream test, with escalation to management attached. Smaller organisations have an easier time of it. That doesn’t make rotation unworkable. We’ve just rarely seen it done right in practice, and the gap is political rather than technical. If you can’t win that argument yet, run the rotation where nobody will scream and let the difference in surprises make the case for you.
It’s a tool for change between people
Which raises what you are actually buying, because it isn’t uptime.
Do I need infrastructure as code for a one-person project?
Probably not. If you’re the only one changing it, and you change it rarely, that nginx box will keep running without any of this.
It keeps running until somebody finds a hole in it, which does happen: nginx patched a buffer overflow in ngx_http_rewrite_module affecting every release from 0.6.27 to 1.30.0. But patching isn’t what you’re buying. You’re buying an answer to “who changed what” the moment a second person shows up.
The analogy is Git. Alone, you can technically skip version control and edit files in place. As soon as you have to merge with someone, you can’t. Infrastructure is the same: two people clicking in one console and you’re down to reconstructing their intent from CloudTrail. Once the spec lives in a repository you also inherit the rest of the toolchain, review and CI and continuous delivery included.
Then there’s the second environment. Standing up staging or production from the console means repeating every click. From code it’s a config change, some parameters, and a shorter wait. Compliance is the third: showing an auditor how things are done becomes a walk through a repository rather than a guided tour of screens.
The control is borrowed from somebody else’s API
There’s a cost on the other side of that ledger, and it rarely makes the business case.
What breaks your infrastructure as code when you did nothing wrong?
Something on the other side of the contract moves: the provider’s schema in a major release, or the service API underneath it.
Ask anyone running Terraform against Cloudflare. Version 5 of the provider was a ground-up rewrite generated from Cloudflare’s OpenAPI spec, released on 29 January 2025 with backwards-incompatible changes and codemods offered to help you through them. That’s a provider migration: the resources were still there, the schema describing them wasn’t. Version pinning absorbs that for as long as you stay on the old major, and then you pay the bill in one go at the upgrade.
The other case is the one pinning can’t reach. When the service itself drops a field, it leaves the provider schema next, and a pinned version only postpones the plan that stops working.
The big cloud providers are the good case. Something you wrote against AWS three or five years ago will probably still apply today. The point isn’t that the sky is falling, it’s that the stability is rented. Money works the same way: a shared belief that holds while everyone keeps believing. Infrastructure as code is a mental construct that lets several people change one estate without getting angry at each other.
So budget for the maintenance. Pin your provider versions, because a requirement with no version constraint accepts any version. Move one version at a time, read the upgrade guide for the resources you use most, and run terraform plan against a non-production state before production sees it. For a large jump, look for migration tooling before you start editing: Cloudflare’s codemods beat hand-editing every resource.
Splitting state is an org chart problem
Maintenance gets harder in proportion to how much of the estate sits in one place, which is where most of the pain at scale starts.
How should I split a Terraform state?
It depends: weigh who owns what, what depends on what, and how far the estate spreads across accounts, regions and environments.
Put everything in one root module and the tool resolves the whole estate on every run. The name for this is a Terralith, defined by Masterpoint in August 2024 and coined before that by Nicki Watt: one root module, one state file holding everything. Masterpoint reports codebases where simple plans and applies take over 30 minutes and then time out or hit API limits. Locking compounds it, since two engineers working on unrelated resources still queue behind one another.
Six years of people asking for a rule hasn’t produced a prevalent pattern. A multi-account, multi-region estate slices differently from a single-account project, and environments layer on top of whichever shape you pick. What does repeat is the layering: a base layer of networking, shared databases and KMS keys that everything depends on, usually owned by one team, with application layers on top split by team or by product. Ownership tends to be the boundary that survives contact with the org chart, because the base layer has a team behind it, but it’s one input into the decision rather than the answer to it.
The other direction is to attack the state engine instead of the repository. Stategraph keeps the dependency graph in PostgreSQL rather than a flat file in S3, locks at the resource level instead of globally, and walks only the subgraph your change reaches, so plan time scales with the change rather than with the estate.
Shared modules are where the defaults live
Slicing solved one problem and created another: once everyone has their own root modules, everyone writes the same bucket twice.
What’s a stack, and how is it different from a module?
A module is a reusable piece of configuration. A stack is a deployable unit, the same composition instantiated per environment.
As far as we recall from talking to people who worked on the feature, Terraform modules were not meant to be reusable components in the way they’re used now. We’d put that no higher than a recollection. What exists today is a deep public catalogue on the Terraform Registry, the same idea designed more deliberately as constructs in AWS CDK, and in most mature organisations a private library maintained by a platform team.
That private library is where security actually lands. A developer who needs a bucket takes the module and gets logging, encryption and blocked public access with it. They supply a name and a parameter or two. Nobody has to remember the checklist, because the module is the checklist.
Stacks are the newer layer. Kief Morris gives them a whole part of the second edition of Infrastructure as Code, and the tools have caught up: Terraform Stacks reached general availability for new HCP Terraform plans at HashiConf 2025. The arc runs one large state, then modules, then environments, then stacks. Each step exists because the previous one stopped scaling.
GitOps pulls and reconciles from inside the cluster
Kubernetes took the same evolution and gave it a different name, which has caused more confusion than it needed to.
Is GitOps just CI with extra steps?
No. CI integrates changes; GitOps keeps a running system continuously reconciled against desired state held in Git.
From the outside the loop looks like a pipeline: watch Git, pull the change, apply it. The OpenGitOps principles name the part a pipeline doesn’t do. Desired state is declarative and versioned, software agents pull it rather than wait to be pushed to, and those agents keep correcting the running system back towards it instead of acting once per commit.
Where that agent runs is what changes your threat model. Argo CD sits inside the cluster and pulls. A CI runner sits outside and pushes, which means handing it the Kubernetes control plane API. Self-hosted runners solve that from your side, and GitHub documents overlay networks for reaching private services from hosted runners. Without one of those, a hosted runner needs a control plane it can reach from the public internet.
Crossplane pushes further: Kubernetes manifests describing cloud resources, reconciled by a controller the way Kubernetes reconciles everything else. Adoption has been patchy, showing up here and there rather than as the default. The reconcile loop also has a sharp edge when you point it at an API you pay for. We watched a stuck bucket deletion retry itself into a real AWS bill: “is it still there? trying to delete. is it still there? trying to delete.” That was about five years ago and may well be fixed since. The lesson generalises anyway, because a reconcile loop against a metered API needs its timeouts chosen on purpose.
Agents can write it, but they can’t promise it
Which brings us to the question that started this one off.
Can an agent replace infrastructure as code?
Not while determinism is the thing you’re paying for, because that’s exactly what an agent doesn’t give you.
An agent will write Terraform “with some level of success” and call cloud APIs with about as much. Both are genuinely useful. Neither produces the same estate twice by construction. Ask for a rebuild and you don’t know what you’ll get, which is the opposite of the contract infrastructure as code offers.
The split that works is the one a repository already gives you: the agent writes, and the apply goes through the same review and the same pipeline a person’s change goes through. The failure modes are the familiar ones, public buckets and public databases. A module configured to block public access reduces those mistakes, because the safe setting is the one that arrives when nobody thinks about it. It doesn’t make the insecure one impossible: a parameter can be overridden, and the module can be skipped altogether. A default is not an enforcement boundary, and if you need the setting to be unavailable rather than unlikely, that’s a separate control.
Paul Stack and the Swamp team are working on exactly this, turning what an agent does into something repeatable. We went through it in episode 92.
The change that would really end infrastructure as code comes from underneath, not above. Clouds give you two interfaces today: APIs, which are flexible, and a console, which is mostly for looking. Your tool is the intermediary that turns intent into API calls. If providers accepted the intent directly and reconciled against it themselves, the intermediary stops earning its keep. CloudFormation is a step in that direction, and StackSets are genuinely better than running Terraform against every account by hand when you’re vending them. The other escape route is the simpler platform: Railway, Neon and the smaller clouds where configuring by hand isn’t painful enough to automate. Simple platforms tend to accrete features, though, and the ones that survive end up needing the same discipline.
What moved in the tooling market
The tool most of this article assumes is now an IBM product line. Mitchell Hashimoto left at the end of 2023, IBM closed the acquisition in February 2025, and Armon Dadgar announced his own last day at the end of March 2026, after almost 13 years. At HashiConf 2025 the roadmap included Terraform actions that dispatch Ansible workflows through the Ansible Automation Platform provider. Somebody once joked about “Terrible”, Terraform plus Ansible in one box. It’s a roadmap item now.
It matters to the argument because the thing keeping that roadmap moving is competition. Terraform went through a stagnant stretch, and Pulumi, then the OpenTofu fork after the licence change, gave it a reason to ship again.
What this means for teams
Nothing here requires a migration or a new platform. It requires knowing which of these is already true of your estate, and four of them you can check this week.
- Time a plan against your largest state. If engineers are waiting on each other’s locks, start the split where ownership already divides, then check what depends on what before you draw the line.
- Pick the one machine nobody will let you redeploy, build its image in Packer, and prove the rebuild somewhere nobody will scream.
- Bump one provider by a single version against a non-production state, so the next schema change arrives on a date you chose.
- Take the three things people get wrong on a bucket, ship them as a module, and make the module the shortest path to a bucket.
Common questions, answered
How do I get a hand-built EC2 instance into code when nobody will let me redeploy it?
Build the image first and prove the rebuild on a copy, then take the evidence into the conversation. Capture what’s on the machine into a Packer template, stand up a parallel instance from that image in a non-production account, and run the workload against it.
What you’re really negotiating is risk, and a working rebuild moves the argument off opinion. Until that exists, every redeploy request sounds like a gamble to whoever owns the service.
How do I stop a Terraform provider upgrade from breaking my configuration?
Pin the provider version, move one version at a time, and run terraform plan against a non-production state before production sees it. The breaking part of a major release is usually a renamed or removed attribute, which the provider’s upgrade guide lists for the resources you use.
For a large jump, check whether the maintainer ships migration tooling. Cloudflare offered codemods alongside the v5 rewrite.
Is it safe to let an AI agent run terraform apply?
Let the agent write the code and send the apply through the same review and pipeline a person’s change goes through. The output is code, so it is readable, reviewable and diffable, and that is where its value is. The apply is where a non-deterministic author stops being an advantage.
Give it the module library rather than raw resources, too. An agent that reaches for your bucket module gets the encryption and the blocked public access as defaults, without having to reason about either.
Related episodes
- Episode 1, Infrastructure as Code is the February 2020 conversation this one revisits, including when not to bother.
- Episode 35, Infrastructure as code (IAC) revisited 2021 is the first revisit, built around the second edition of Kief Morris’s book.
- Episode 2, GitOps covers the pull-from-the-cluster model before Argo CD was the obvious default.
- Episode 83, OpenTofu vs Terraform: Where We Are Now with Cole Bittel is the detailed version of the fork question, with a contributor.
- Episode 85, Is It Time for OpenTofu? Our HashiConf Takeaways covers Stacks going GA and the Ansible integration from the conference floor.
- Episode 92, From System Initiative to SWAMP: Agent-Native Infra with Paul Stack is where the agent determinism argument gets its full hearing.
- Episode 100, 100 Episodes Later: What Still Matters in DevSecOps has the longer version of HashiCorp’s transformation.
Resources
- HashiCorp Terraform Module Registry, Mitchell Hashimoto, 19 September 2017, settles that the public registry of verified and community modules predates the 2020 episode by two and a half years.
- Cloudflare Terraform provider v5.0.0 release notes, 29 January 2025, settles that v5 is a ground-up provider rewrite generated from Cloudflare’s OpenAPI spec, with backwards-incompatible schema changes and codemods.
- The Terralith: Monolithic Architecture of Terraform & Infrastructure as Code, Yangci Ou, 22 August 2024, settles the definition and the reported 30-minute plans, and credits Nicki Watt with the term.
- Stategraph settles what the database-backed approach claims: a dependency graph in PostgreSQL, resource-level locks instead of a global one, and plans that walk only the subgraph a change reaches.
- OpenGitOps principles settles what GitOps requires beyond a pipeline: declarative, versioned desired state, pulled by software agents, continuously reconciled.
- Scale infrastructure with new Terraform and Packer features at HashiConf 2025, 25 September 2025, settles that Stacks reached general availability and that Terraform actions were still in public beta.
- Terraform and Ansible: unifying infrastructure provisioning and configuration management, 25 September 2025, settles what the integration actually is: actions in the Ansible Automation Platform provider that dispatch Event-Driven Ansible.
- Armon Dadgar: “This Friday is my last day at HashiCorp (and IBM)”, his own announcement at the end of March 2026, settles that he left after almost 13 years and that both founders have now gone, following IBM’s completed acquisition on 27 February 2025.
Since we recorded
The upstream API point arrived on schedule. Cloudflare’s provider release 5.22.0, published in July 2026, removed the crawl_options block from ai_search_instance because Cloudflare’s AI Search API dropped the field from its public schema in June 2026, so configurations referencing it stopped planning. OpenTofu shipped 1.13.0 on 30 September 2026, which is the competition still doing its job. And we ran the same revisit for the other half of the pipeline in episode 107, Continuous Integration in 2026.
