Encore, Pulumi, Terraform, OpenTofu, AWS CDK and Crossplane, judged by how many checks an agent gets on its own infrastructure change before anything is applied.
An agent writing infrastructure code has the same problem as one writing application code: it needs to know whether the change works before it moves on. With application code it runs the tests. With most infrastructure as code tools, the only real test is an apply against a cloud account, and a wrong argument can open a bucket or replace a database.
The way to compare these tools for agents is to count the checks the agent gets on its own before an apply. A compiler, a local run and a preview each catch a different class of mistake, and more of them means fewer surprises reaching review.
What an agent needs from an infrastructure as code tool:
Encore is an open source infrastructure SDK for TypeScript and Go that declares infrastructure in the application code. The agent declares a database, a topic or a bucket where the code uses it, and Encore derives what to provision. encore run starts those resources locally, and a deploy creates them in your own AWS account or GCP project.

Adding a database and an endpoint that writes to it is one change:
import { api } from "encore.dev/api";
import { SQLDatabase } from "encore.dev/storage/sqldb";
// RDS on AWS, Cloud SQL on GCP, a local Postgres with `encore run`.
const db = new SQLDatabase("notes", { migrations: "./migrations" });
export const addNote = api(
{ expose: true, method: "POST", path: "/notes" },
async ({ text }: { text: string }): Promise<{ id: number }> => {
const row = await db.queryRow<{ id: number }>`
INSERT INTO notes (text) VALUES (${text}) RETURNING id`;
return { id: row!.id };
},
);
This gives the agent all three checks. A misnamed resource or a wrong option is a build error. encore run starts Postgres and applies the migrations, as the database docs describe, and the agent calls addNote to see the row come back. The pull request then gets a preview environment with its own database. On deploy, Encore provisions the resources in your AWS account or GCP project and provisions an IAM role for the service. Sizes, networking and backups are set per environment, and AI integration covers the agent rules and MCP server.
encore run and encore test.encore run. The same bucket declaration is used in preview environments and production.Encore covers the resources a backend uses, not every cloud service. A CloudFront distribution or an organization-wide VPC stays in Terraform or Pulumi next to it.
Run in your terminal to get started locally.
Pulumi gives the agent the first check for free: a wrong argument in a TypeScript program is a compiler error before anything talks to the cloud. The second check is pulumi preview, which shows the resource diff and needs credentials for the target account. Pulumi also ships an MCP server, locally under Apache 2.0 and as a hosted endpoint, and Neo, its own infrastructure agent with policy checks and approval steps.
What it cannot do is run the resources. The agent still writes the VPCs, roles and security groups, a typed program can describe a public bucket as easily as a private one, and policy packs and the preview do the rest of the safety work. The CLI is open source and state can live in your own backend, with Pulumi Cloud's free edition covering one user without Neo.
Terraform has the largest body of public HCL, and the Terraform MCP Server gives agents current provider and module docs and can manage HCP Terraform workspaces. HashiCorp warns not to use the server with untrusted MCP clients or models, since it can expose Terraform data to them.
The agent's checks are terraform validate for syntax and terraform plan against real state and credentials. Mistakes in argument types surface at plan or apply time rather than in the editor. Terraform 1.6 and later use the Business Source License 1.1, and HashiCorp has been part of IBM since February 2025.
OpenTofu is the MPL 2.0 fork of Terraform, accepted into the CNCF in April 2025, with client-side state encryption that Terraform's open releases lack. For agents, the loop matches Terraform's: validate, then plan against an account.
Good to know: some newer Terraform features differ between the two, and an agent trained on recent Terraform docs can suggest syntax OpenTofu does not support.
The CDK gives the agent types and L3 patterns that collapse a load balanced service into one class, and cdk synth runs locally to catch construct errors. After that, the feedback comes from CloudFormation: cdk diff against the account, then a deploy that rolls back when a resource fails. The synthesized template is much longer than the code the agent wrote, which makes the diff the thing to review.
Crossplane turns a Kubernetes cluster into a control plane for cloud resources, and graduated in the CNCF in late 2025. Platform teams publish compositions, and agents request resources through short claims that the API server validates against a schema. There is no plan step: once a claim is applied, the controllers reconcile it, which puts the whole review at the pull request.
Martin Fowler's description of infrastructure as code rests on reviewable, repeatable definitions, and agents raise the volume of changes to review. The Thoughtworks Technology Radar tracks infrastructure as code as a technique, and the same discipline applies to agent diffs. For the licence question, see IBM's completed HashiCorp acquisition and OpenTofu's CNCF project page.
The one that gives the agent the most checks before an apply. Encore declares infrastructure in application code, catches bad declarations at build time and runs the resources locally with encore run. Pulumi and the AWS CDK add type checking before a preview. Terraform and OpenTofu rely on validate and plan, which need a real cloud account.
Agents have seen more HCL, and the Terraform MCP Server supplies current provider and module docs. Pulumi programs get type errors from the host language before a preview, and Pulumi offers its own MCP server and the Neo agent. Both still need a human to read the plan or preview.
The agent creates a SQLDatabase from encore.dev/storage/sqldb with a migrations folder, runs encore run to start Postgres locally and test the change, and opens a pull request. On deploy, Encore provisions RDS on AWS or Cloud SQL on GCP in your account.
Deploy to your cloud on AWS and Google Cloud
without managing infrastructure
Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.