Anthropic Drops a Terraform Provider to Manage Claude Agents Like Infrastructure
Anthropic shipped a Terraform provider that lets teams manage Claude agents, workspaces, and encryption keys with the same plan-and-apply workflow as the rest of their infrastructure.
Takeaways
- Anthropic released its official Terraform provider in public beta under source
anthropics/anthropic. - Manages Claude Managed Agents, environments, vaults, skills, memory stores, and deployments as code.
- Also covers Admin API resources: workspaces, service accounts, Workload Identity Federation, and customer-managed encryption keys.
- Supports Claude Managed Agents on Amazon Bedrock via
platform = "bedrock". - Requires Terraform 1.11+, the ant CLI for auth, and deletion protection is on by default.
- Schema may change during beta; pin your lock file. Repo here.
Anthropic has released its Terraform provider in public beta. Teams can now manage Claude agents, workspaces, identities, and encryption-key registrations alongside their existing infrastructure, with changes reviewed through pull requests and terraform plan.
The provider turns Anthropic API resources into declarative Terraform configuration. Git records who changed an agent or workspace, CI can validate proposed updates, and reverting HCL followed by terraform apply restores an earlier configuration. Reverting an agent may create another server-side version rather than performing a transactional rollback.
One provider, two control planes
The provider covers Claude Managed Agents and Anthropic organization administration. Its current resource groups include:
| Resource group | Managed objects |
|---|---|
| Managed Agents | Agents, environments, vaults, skills, memory stores, and deployments |
| Admin API | Workspaces, members, service accounts, Workload Identity Federation issuers and rules, and customer-managed encryption keys |
Setting platform = "bedrock" configures Claude Managed Agents on Amazon Bedrock, aligning the provider with Anthropic’s parallel Managed Agents preview on AWS.
Authentication before apply
Running the provider requires Terraform 1.11 or later, the ant CLI, an Anthropic organization ID, and access to Claude Managed Agents for agent-related resources. The provider reads credentials established through the CLI rather than requiring an API key in an environment variable.
Managed Agents operations require workspace-scoped credentials. An organization-wide administrative token cannot create or update those resources.
A minimal agent configuration looks like this:
terraform {
required_providers {
anthropic = {
source = "anthropics/anthropic"
}
}
}
provider "anthropic" {
organization_id = var.organization_id
}
resource "anthropic_beta_agent" "assistant" {
name = "quickstart-assistant"
model = { id = "claude-opus-5-5" }
system = "You are a concise, careful assistant."
}
The official provider source is anthropics/anthropic. Terraform providers execute with access to local credentials, so a package installed from another namespace could read them. A separate MemoryStore/anthropic package is already listed in the registry; teams should verify the source in configuration and dependency-lock changes.
Agent updates create versions
Updates to an agent publish a new server-side version. The provider exports the resulting version attribute, allowing applications to pin sessions or deployments to a known revision.
Deletion protection is enabled by default. Destructive operations require deletion_protection = false, and deleting an agent through Terraform archives it on Anthropic’s service rather than erasing it immediately.
The provider also adds the managed-agents-2026-04-01 beta header to Managed Agents API requests. Users do not need to configure that header, although its beta status means the associated API and Terraform schema may change.
State becomes a security boundary
Terraform state can contain agent system prompts, custom tool schemas, memory content, inline skill files, and MCP server URLs. That makes the state backend part of the application’s security boundary, even when the HCL repository contains no credentials.
Production deployments should use an encrypted remote backend with restricted access, audit logging, and state locking. Plan files and state snapshots should stay out of pull-request attachments, build artifacts, and general-purpose log storage.
Where automation pays off
- Consistent environments: Modules can create matching development, staging, and production agents without manually copying console settings.
- Reviewable agent changes: System prompts, model selections, tools, and identity settings appear in Terraform plans before deployment.
- Automated identity setup: Service accounts and Workload Identity Federation rules can move through the same CI/CD process as other access controls.
- Recoverable configuration: Terraform can reconstruct Anthropic-side workspaces, agents, vaults, and key registrations. External key material and connected services still need separate recovery procedures.
Beta constraints to plan around
Resource types, arguments, and behavior may change during the public beta. Teams should commit .terraform.lock.hcl, set an explicit provider-version constraint, and review provider upgrades before running them against shared environments.
Import and migration plans also need to account for existing console-created resources. Terraform can manage a resource safely only after its remote identity and desired configuration are represented in state and HCL; otherwise, an apply may attempt to create a duplicate or overwrite unmanaged settings.
Why platform teams care
Production agent systems need repeatable configuration, access controls, change review, and recovery procedures. The provider gives Claude resources the same workflow that many platform teams already use for networks, cloud identities, and application infrastructure.
The Terraform Registry and GitHub repository are live, including a managed-agents/quickstart example. A controlled rollout can begin with one non-production workspace, encrypted remote state, a pinned provider version, and CI checks for every plan.