Anthropic's Terraform Provider: How to Manage Claude Agents
Anthropic's Terraform provider is in public beta. What it manages, how to set it up, the state-file catch, drift checks, and how it compares with OpenAI's.

Anthropic's Terraform provider is in public beta. What it manages, how to set it up, the state-file catch, drift checks, and how it compares with OpenAI's.

On December 3, 2026, Anthropic released an official Terraform provider in public beta. The Claude Platform release notes ↗ say it manages "Claude Platform resources as code." That covers organization resources like workspaces, service accounts and Workload Identity Federation rules, and Claude Managed Agents resources like agents, environments, vaults and skills.
The @ClaudeDevs account ↗ announced it that evening (22:43 UTC): "Define Claude Managed Agents, workspaces, and members as code, version them with the rest of your infrastructure, and review each change with terraform plan." aiholics ↗ (Leo Martins, December 3) covered the launch and the state-file trade-off below.
Version 0.1.0 went up on the Terraform Registry ↗ at 18:54 UTC on December 3. The Registry counted 248 downloads when we checked on December 4. The code is on GitHub ↗ under Apache 2.0.
Coverage depends on where you run Claude:
Claude API (Anthropic's own platform): the full set. That means workspaces, members, service accounts, federation, plus agents, environments, vaults, skills, memory stores and deployments.
Claude Platform on AWS and Claude Models on Google Cloud (Anthropic managed): "many of these resources," per the release notes.
Claude Managed Agents on Amazon Bedrock, which launched December 1: only agents, memory stores and memories.
Every change to an agent publishes a new version, which Terraform exports. A session that names a version stays on it, so you can pin production to a reviewed config while you test changes elsewhere.
Anthropic's setup guide ↗ asks for Terraform 1.11 or later, the ant CLI, and access to Claude Managed Agents if you want agent resources. The GitHub README lists Terraform 1.0 as the minimum, with 1.11 needed only for write-only secrets. To be safe, use 1.11.
Add the provider with source = "anthropics/anthropic". Anthropic says that's "the only official source address," and that a provider from any other address "could read" your credentials.
Set organization_id. The provider checks that your credentials belong to that organization and refuses to run if they don't.
Sign in with ant auth login, and unset ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN, because either one overrides the login.
Run terraform init, terraform plan, terraform apply. Then run plan again. It should say No changes, and Anthropic asks you to report it as a bug if it doesn't.
Credentials are split. Organization resources need an Admin API key or an org:admin profile. Managed Agents resources need a workspace key or profile. In CI, Anthropic recommends Workload Identity Federation over long-lived keys.
Your prompts end up in the state file. The behavior docs ↗ and the Registry page warn that state and plan output hold "system prompts, tool schemas, memory content, and inline skill files" in plain text. Anyone who can read your state backend can read your agents' instructions. Vault secrets go in write-only _wo arguments that are never stored. But a secret passed through an ordinary variable still lands in a saved plan, so declare those variables ephemeral = true.
Deletion protection is on by default. terraform destroy fails until you set deletion_protection = false and apply. Destroying most resources archives them for good.
It's a beta. Resource types and arguments "can change," so commit .terraform.lock.hcl. aiholics notes there's no GA date or support commitment yet.
The most common question under Anthropic's post was about console edits. "our worry is the friday hotfix: someone edits the support agent's prompt straight in the console, outside terraform. does terraform plan flag that drift on monday" — @f0rgent ↗. @arangs ↗, @fayazbuilds ↗ and @RunLMdev ↗ asked the same thing. Anthropic's operations guide ↗ answers it: "Run terraform plan on a schedule to catch drift," and also run terraform plan -refresh-only.
"Right now a one-line prompt edit changes what an agent does every morning, and nobody sees a diff." — @AntonyShakirov ↗
"Two things I'd check first: that a scope change shows up clearly in terraform plan, and that API keys never land in state. That's where IaC usually leaks." — @elchefo ↗
"agents with memory stores, managed in terraform. the first resource that can drift all by itself" — @cagatay_dev ↗
"pulumi provider? When?" — @WaldemarKindler ↗. Engin Diri, a solutions architect at Pulumi, replied ↗ that Pulumi's "Any Terraform Provider" support can already wrap it.
Reddit wouldn't load for us (blocked), so these reactions are from X.
If you run more than a couple of Claude agents in production, adopt this now, on a non-critical workspace first. Prompt and tool-permission changes are the riskiest edits you can make to an agent, and today they mostly happen in a console with no review. Getting them into a pull request with a plan diff is the biggest change here, more than the convenience. Pinning sessions to agent versions is a real rollback story.
Lock down your state backend before you do. Treat it like a secrets store, because it now holds your system prompts and memories. And @cagatay_dev's point is a good one: memory stores change as agents run, so expect plans to show changes you didn't make.
Versus OpenAI: OpenAI has had an official provider, openai/openai ↗, for longer. It's at v1.8.1 with about 203,000 Registry downloads. But it manages admin resources: projects, users, roles, service accounts, rate limits, spend alerts and webhooks. It doesn't define agents. Anthropic's provider is less mature but goes a layer deeper, into the agent itself. If you're weighing agent platforms, see our agent frameworks comparison and our coverage of self-hosted Managed Agents and Claude on-prem via AWS. For coding-agent picks, see our Claude Code review. We haven't run the provider ourselves yet.
Anthropic: Claude Platform release notes ↗ (December 3, 2026)
Anthropic docs: Terraform provider ↗, How the provider behaves ↗, Operate the provider ↗, checked December 4, 2026
Terraform Registry: anthropics/anthropic ↗; GitHub: anthropics/terraform-provider-anthropic ↗, openai/terraform-provider-openai ↗, checked December 4, 2026
aiholics: Claude agents can now live in Terraform code, and their prompts in its state file ↗ (December 3, 2026)
X: @ClaudeDevs ↗ (December 3, 2026)