Infrastructure Has a New Interface
For a decade, infrastructure as code meant writing declarative configuration files — HCL for Terraform, YAML for CloudFormation, TypeScript for Pulumi and AWS CDK. You described the desired state of your cloud resources in code, committed it to version control, and ran a plan/apply cycle to make it real.
In 2026, AI coding agents have inserted themselves into that workflow. Claude Code, Cursor, Codex, and Gemini CLI can generate Terraform modules, write Pulumi programs, scaffold Kubernetes manifests, and debug failed deployments. Pulumi shipped Neo, a purpose-built infrastructure agent that takes natural language requests and autonomously plans and executes infrastructure changes. AI agents already drive 20% of all operations on Pulumi's platform [1] — up from virtually zero a year ago.
The IaC market has reached $2.1 billion with a 28.2% CAGR. [2] But the shift isn't just about market size — it's about who is writing the infrastructure code. The answer, increasingly, is agents. And that changes the risk profile of every deployment.
The 2026 Tool Landscape
The IaC ecosystem has consolidated around a few major players, each with a different relationship to AI agents:
Terraform and OpenTofu
Terraform remains the most widely deployed IaC tool, with HCL as its configuration language. HashiCorp is positioning HCP Terraform as the governance and control plane for AI-driven infrastructure [3] — arguing that as agents write more configuration, the critical challenge shifts from authoring to verifying and safely executing it. Policy enforcement, state management, and approval workflows become the value layer.
OpenTofu, the CNCF-governed fork created after HashiCorp's license change, offers a drop-in Terraform replacement for teams that need vendor-neutral, open-source IaC. For agent workflows, both Terraform and OpenTofu work identically — agents generate HCL, and the plan/apply cycle remains the same.
Pulumi
Pulumi uses general-purpose programming languages — TypeScript, Python, Go, C#, Java — instead of a domain-specific language. This gives it a structural advantage for AI-agent workflows: coding agents like Claude Code and Cursor already understand TypeScript and Python. No IaC-specific tooling to bolt on. The agent writes infrastructure code the same way it writes application code.
Pulumi Neo takes this further. It's a purpose-built infrastructure agent that can reason over deployed infrastructure, generate or modify IaC, run previews, apply policy-as-code, operate within the initiating user's RBAC permissions, and create pull requests for human review. Neo is available in the Pulumi CLI, in GitHub (mention @neo on PRs to investigate failures), and in the Pulumi Cloud console. One customer migrated 500 Terraform workspaces to Pulumi in an hour using Neo. [1]
HashiCorp's deprecation of CDKTF (Cloud Development Kit for Terraform) in December 2025 [4] left Pulumi as the leading option in the "real languages for IaC" category.
AWS CDK, Crossplane, and SST
AWS CDK remains the standard for AWS-native infrastructure using TypeScript or Python constructs. It compiles down to CloudFormation, which gives it deep AWS integration but locks you to one provider.
Crossplane extends IaC into Kubernetes-native, continuously reconciled infrastructure — ideal for GitOps environments where the cluster itself is the control plane.
SST adds developer experience on top of CDK and Pulumi for serverless-heavy workloads, with live development and a management console.
Getting Started: Agents Writing Infrastructure
If you're already using an AI coding agent for application code, extending it to infrastructure is straightforward — with important caveats.
Start with What the Agent Already Knows
General-purpose coding agents (Claude Code, Cursor, Codex) understand TypeScript, Python, Go, and HCL. Point them at your existing infrastructure code, describe the change you want, and review the output. A Pulumi program in TypeScript is just TypeScript — the agent doesn't need special IaC training to generate it. A Terraform module in HCL is well-represented in training data.
Use Plan Mode Before Apply
Never let an agent apply infrastructure changes without reviewing the plan. terraform plan and pulumi preview exist for exactly this reason — they show you what will be created, modified, or destroyed before anything happens. This is the non-negotiable gate in any agent-driven IaC workflow.
Scope the Agent's Permissions
The agent should operate with the minimum cloud permissions required for the task. Don't give an agent admin credentials to your AWS account. Use scoped IAM roles, service accounts, or RBAC-limited tokens. Pulumi Neo operates within the initiating user's RBAC permissions by design — a pattern every IaC agent workflow should follow.
Keep State Locked
When multiple agents — or agents plus humans — operate on the same infrastructure, state conflicts become the critical failure mode. Both Terraform and Pulumi handle this via state locking (only one writer at a time), but locking prevents concurrent writes, not logical conflicts. Coordinate who is changing what.
The Pain Points
AI-generated infrastructure code has a specific failure profile that differs from application code. The pain is concentrated in three areas: consistency (28% of reported issues), cost (24%), and security (20%). [5]
Insecure Defaults
AI assistants generate syntactically correct HCL and TypeScript that passes linting — but silently applies insecure defaults that reviewers miss. Research shows only 3 out of 7 leading LLMs produce infrastructure code that meets basic security standards. [6]The others generate what one analysis called "cloud time bombs": S3 buckets without encryption, security groups with overly permissive ingress rules, databases with public endpoints.
The fix is policy-as-code. Tools like Open Policy Agent (OPA), Checkov, and Pulumi's CrossGuard let you define security policies that run automatically against generated infrastructure code. If the agent creates a public S3 bucket, the policy check catches it before deployment.
The Comprehension Gap
Teams delegating IaC authoring to AI gain velocity but lose their mental model of what's actually deployed. The comprehension gap widens with every accepted suggestion — and only reveals itself when an incident escalates and no one on the team understands the infrastructure they're debugging.
This is not a theoretical risk. It's the same pattern that happened with copy-paste infrastructure from Stack Overflow a decade ago, accelerated by the speed and volume of AI-generated code. The mitigation is disciplined review: read the plan output, understand what each resource does, and maintain documentation that maps infrastructure to business purpose.
Autonomous Drift Remediation
Some teams are experimenting with agents that automatically detect and remediate infrastructure drift — configuration that has diverged from the declared state. This sounds appealing until the agent overwrites a manually applied emergency patch at 3 AM. Autonomous drift remediation by AI agents overwriting emergency patches is a documented production risk.
Infrastructure automation works best as a human-in-the-loop workflow, not a fully autonomous one. The goal is speed and confidence, not the removal of human judgment.
Cost Surprises
Agents don't optimize for cloud spend by default. They generate the configuration that satisfies the requirement — which may include an oversized instance type, a redundant NAT gateway, or a storage class that costs ten times what you need. Without cost-aware policies or budgets applied to the IaC pipeline, agent- generated infrastructure can silently inflate your cloud bill.
What a Production Workflow Looks Like
The teams getting the most from AI-driven IaC have converged on a pattern:
- Agent generates infrastructure code — from a natural language description or by modifying existing modules. The agent writes Terraform HCL, Pulumi TypeScript, or CDK constructs.
- Policy-as-code validates — security policies, cost guardrails, and compliance rules run automatically against the generated code.
- Plan/preview shows the diff —
terraform planorpulumi previewsurfaces exactly what will change in the cloud environment. - Human reviews and approves — an engineer reads the plan, verifies it matches intent, and approves the apply.
- Apply with audit trail — the change is applied with full logging, state updates, and traceability back to the originating request.
This is not fully autonomous infrastructure management. It's AI-accelerated infrastructure management with human checkpoints at the gates that matter.
Where This Is Heading
The trajectory is toward agents that understand infrastructure as deeply as they understand application code. Pulumi's bet — that general-purpose languages make IaC agent-native by default — is gaining ground. HashiCorp's bet — that governance and verification become the value layer as authoring gets automated — is equally valid. Both are right: agents will write more infrastructure code, and the systems that verify, constrain, and approve that code will become more important, not less.
For developers getting started, the advice is the same as with agentic coding for application code: start small, review everything, and build the verification habits now. The agents will get faster. Your infrastructure still needs to be correct.