Last updated: December 4, 2026
Anthropic’s Terraform provider, launched in beta on December 3, 2026, lets you manage Claude Platform resources as code. It covers workspaces, service accounts and identity federation, plus Claude Managed Agents, environments, vaults and skills. Install it as anthropics/anthropic, sign in with the ant CLI, and pin versions during the beta.
Contents
- What Anthropic launched
- The provider at a glance
- How to set up the provider
- Authentication and credential order
- AWS, Google Cloud and Amazon Bedrock
- Security: state, secrets and least privilege
- Workflows and caveats
- Frequently asked questions
What Anthropic launched
On December 3, 2026, Anthropic added a Terraform provider in beta to the Claude Platform. It manages organization resources, such as workspaces, service accounts, workload identity federation issuers and federation rules, and Claude Managed Agents resources, such as agents, environments, vaults and skills (Claude Platform release notes).
The point is review. Changes to agents and workspaces go through the same plan and apply workflow as the rest of your infrastructure, instead of clicks in the Claude Console (Claude Platform docs). If you have been building agents by hand, our Claude Agent SDK guide covers the code-side alternative.
The provider at a glance
Key facts from Anthropic’s docs and the registry page (Claude Platform docs) (Terraform Registry):
| Item | Details |
|---|---|
| Status | Public beta; resource types and arguments can change |
| Source address | anthropics/anthropic (the only official address) |
| Terraform version | 1.11 or later per the setup guide; 1.11+ required for write-only secrets |
| Other requirements | The ant CLI; Managed Agents access for agent resources |
| Organization resources | Workspaces, members, service accounts, federation, webhooks, telemetry destinations |
| Managed Agents resources | Agents, environments, vaults, skills |
| Platforms | Anthropic (default), aws, google_cloud, bedrock |
| Destroy behavior | Deletion protection on by default; destroying an agent archives it |
How to set up the provider
This follows Anthropic’s quickstart, which creates a sandboxed environment and one agent (Claude Platform docs):
- Install Terraform 1.11 or later and the
antCLI. - In an empty directory, create
main.tfwith arequired_providersblock that setssource = "anthropics/anthropic", and aprovider "anthropic"block withorganization_id. Every plan then checks that your credentials belong to that organization. - Add an
anthropic_beta_environmentresource. The example uses a cloud container with limited networking that allows package managers. - Add an
anthropic_beta_agentresource with a name,modelID,systemprompt and tools. Each change publishes a new server-side version, andversionis exported for pinning. - Run
ant auth login, andunsetANTHROPIC_API_KEYandANTHROPIC_AUTH_TOKEN, because either overrides the login. - Export
TF_VAR_organization_id(shown byant auth statusor in Console organization settings), then runterraform init,planandapply. - Run
terraform planagain. It should reportNo changes; Anthropic asks you to report anything else as a bug.
One detail in the example is easy to miss: with limited networking and no allowed_hosts, web search and web fetch would return nothing, so the quickstart turns both tools off.
Authentication and credential order
With the default platform, a provider block uses the first credential it finds, in this order (Terraform Registry):
api_key,auth_tokenorprofilein the blockANTHROPIC_API_KEYANTHROPIC_AUTH_TOKEN- The
antprofile named byANTHROPIC_PROFILE - Workload identity federation environment variables
- The
antCLI’s active profile
Different resources need different credentials (Terraform Registry):
| Resources | Credential needed |
|---|---|
| Workspaces, members, external keys, telemetry destinations, organization webhooks | Admin API key or a profile with org:admin |
| Service accounts and federation | Profile with org:admin |
| RBAC, plugin marketplaces, Claude Tag | Enterprise Admin API key with that feature’s scopes |
| Claude Managed Agents | API key or profile for the workspace |
| MCP tunnels and certificates | Federation profile with workspace:manage_tunnels or org:admin |
To manage two identities from one configuration, add a second provider block with an alias and its own profile, then set provider = anthropic.research (or your alias) on the resources that should use it. In CI, Anthropic recommends a federation profile rather than raw environment variables.
AWS, Google Cloud and Amazon Bedrock
Set platform to manage resources outside the Anthropic API (Terraform Registry):
- AWS and Google Cloud:
platform = "aws"or"google_cloud"manages resources on Claude Platform on AWS or Claude Models on Google Cloud (Anthropic managed). Both need theworkspace_idof an existing workspace and use your cloud credentials. - Amazon Bedrock:
platform = "bedrock"exposes onlyanthropic_beta_bedrock_agent,anthropic_beta_bedrock_memory_storeandanthropic_beta_bedrock_memory. It uses the AWS credential chain and stops ifAWS_BEARER_TOKEN_BEDROCKis set, because Managed Agents does not accept a Bedrock API key. Hereworkspace_idis the Bedrock project ID and defaults todefault. - No moves: a resource cannot move to another platform, account, project, region or workspace. Recreate it, or
terraform state rmand import the copy that already exists there.
For the Bedrock side in depth, see our Claude Managed Agents on Amazon Bedrock guide.
Security: state, secrets and least privilege
The registry page lists several risks that matter more here than with most providers (Terraform Registry):
- State is plain text: state and plan output include system prompts, tool schemas, memory content and inline skill files. Use an encrypted, access-controlled backend.
- Secrets: arguments ending in
_wo, such as vault credential secrets, are write-only and never stored in state. Pass secrets through variables declared withephemeral = true, or a saved plan can still contain them. - MCP URLs: state stores the MCP server URL of every agent Terraform reads, so keep tokens in a vault credential, not the URL.
- Least privilege: prefer workload identity federation or a key scoped to one workspace. With an organization-level credential, pin module versions and commit
.terraform.lock.hcl. - Source address: a provider from any address other than
anthropics/anthropiccould read your credentials.
Workflows and caveats
Patterns that follow from the docs:
- Agents in pull requests: keep system prompts and tool settings in Git, so a prompt change gets the same review as code. Pin an agent’s exported
versionwhere a session must not change under you. - Beta upgrades: commit the lock file so you choose when to adopt schema changes.
- Teardown: set
deletion_protection = false, apply, then destroy. Destroy deletes environments but archives agents.
Anthropic publishes no separate price for the provider; the resources it creates are billed as usual. For other recent Claude tooling, see our guides to Claude Code 2.1.335 and Claude Ship.
Frequently asked questions
Is there an official Terraform provider for Claude?
Yes. Anthropic launched an official Terraform provider in beta on December 3, 2026. Its only official source address in the Terraform Registry is anthropics/anthropic.
What can the Anthropic Terraform provider manage?
Organization resources such as workspaces, service accounts and workload identity federation, plus Claude Managed Agents resources such as agents, environments, vaults and skills.
Which Terraform version do I need?
The Claude Platform guide lists Terraform 1.11 or later. The registry page says 1.0 or later works, but 1.11 or later is needed to set write-only secrets.
Does the provider work with Amazon Bedrock?
Yes, with platform set to bedrock, but only for Bedrock agents, memory stores and memories. It uses the AWS credential chain and rejects Amazon Bedrock API keys.
Why does terraform destroy fail?
Deletion protection is on by default. Set deletion_protection to false on the resources, apply, then run terraform destroy. Destroying an agent archives it.
Sources
- Claude Platform release notes, December 3, 2026 (Anthropic)
- Terraform provider (Claude Platform docs)
- Anthropic provider documentation (Terraform Registry)
Image: Claude AI symbol by Anthropic, CC0, via Wikimedia Commons. Claude is a trademark of Anthropic and Terraform is a trademark of HashiCorp. FreeAnswers is not affiliated with either company.
1 thought on “Claude Terraform Provider: Power-User Guide to Setup, Auth and Managed Agents”