Sulat.com / Writing on AIFriday, December 4, 2026
Enter →
Agent Engineering/4 December 2026

Anthropic’s Terraform provider for Claude agents

Anthropic's official Terraform provider is in public beta. I ran it against a live account: a prompt edit shows up as a plan, outside edits are caught, and destroy archives an agent for good.

Glossy 3D Anthropic logo beside a glowing code blueprint scroll above stacked glass blocks with a small robot, for the Terraform provider
Illustration: Sulat, featuring the Anthropic logo

At a glance

  • Anthropic's Terraform provider is in public beta as version 0.1.0 under the source address anthropics/anthropic.
  • It ships 33 resources and 69 data sources, covering Claude Managed Agents and organisation settings such as workspaces and service accounts.
  • In my run, a system prompt edit appeared as a normal plan, an edit made outside Terraform was caught and reverted, and the agent answered from the applied version.
  • Managed Agents resources need a workspace credential while organisation resources need admin access, and destroy archives an agent permanently.

Anthropic has put its Terraform provider into public beta. It lets a team describe Claude Managed Agents, environments, vaults, workspaces and service accounts in configuration files, review each change with terraform plan and apply it. The release is version 0.1.0 under the source address anthropics/anthropic, and ClaudeDevs announced it on 3 December.

I installed it and ran it against a live account. I created an environment and an agent, edited the agent’s prompt, changed it behind Terraform’s back, started a session on it, then destroyed it. Most of it worked first time. The sharp edges are in the credentials and in what destroy does.

James Berthoty, CEO of Latio, pointed to the release that night as “the actually huge release more than ‘omg RSA is hacked'”.

James Berthoty quoting the ClaudeDevs announcement on 3 December.

What the provider covers

Version 0.1.0 has 33 resources and 69 data sources. I counted them from the schema Terraform printed after terraform init, and 21 of the resources carry a beta_ prefix because they call beta APIs.

They fall into two groups. The Managed Agents group covers agents, environments, vaults and their credentials, skills, memory stores, scheduled deployments and tunnels into private networks. The organisation group covers workspaces and their members, service accounts, workload identity federation, customer-managed encryption keys, telemetry destinations, RBAC groups, spend limits, organisation webhooks and Claude Tag settings for Slack. The docs say Developer API keys, invites and usage reports aren’t resources, so those still go through the Admin API directly.

Key numbers: 33 resources, 69 data sources, 21 of them beta, in Anthropic Terraform provider 0.1.0
Counts from the provider’s schema, read on my machine. Illustration: Sulat.

The provider also runs on other platforms. Setting platform switches it to Claude Platform on AWS, Claude Models on Google Cloud or Amazon Bedrock. On Bedrock only agents, memory stores and memories are available.

What I ran

My machine is a cloud sandbox with four vCPUs (an Intel Xeon at 2.30 GHz), 15 GB of memory and a 252 GB disk, running Ubuntu 24.04.5 on kernel 6.18.44. I used Terraform 1.17.3 and provider 0.1.0. This is the configuration, the docs’ quickstart run as written:

Code
terraform {
  required_providers {
    anthropic = {
      source = "anthropics/anthropic"
    }
  }
}

variable "organization_id" {
  type = string
}

provider "anthropic" {
  organization_id = var.organization_id
}

resource "anthropic_beta_environment" "sandbox" {
  name        = "quickstart"
  description = "Cloud sandbox for the quickstart agent."

  config = {
    cloud = {
      networking = {
        limited = {
          allow_package_managers = true
        }
      }
    }
  }
}

resource "anthropic_beta_agent" "assistant" {
  name        = "quickstart-assistant"
  description = "General-purpose assistant with the built-in toolset."

  model = {
    id = "claude-opus-5-5"
  }

  system = "You are a concise, careful assistant."

  tools = [
    {
      agent_toolset_20260401 = {
        configs = [
          { web_search = { enabled = false } },
          { web_fetch = { enabled = false } },
        ]
      }
    },
  ]
}

terraform init pulled version 0.1.0 from the registry. The first plan proposed two additions, and the apply created the environment and the agent in about half a second. The agent came back as version 1. A second plan reported no changes, which is the check the docs ask you to make.

I signed in with an API key scoped to one workspace, exported as ANTHROPIC_API_KEY, rather than the ant auth login route the docs lead with. The provider still insisted on the organisation ID, and it printed a warning on every run naming the organisation it was about to change.

A prompt edit becomes a plan

I added one sentence to the system prompt, “Answer in NZ English.”, and ran terraform plan. The plan showed an in-place update to the agent with the old and new prompt side by side, and the version marked as changing on apply. Applying it made the agent version 2.

Terminal screenshot of terraform plan: the agent's system prompt changes and its version goes from 1 to known after apply
The plan from my run: one prompt line changed, and the version moves on apply.
Hand-drawn steps: change one prompt line, terraform plan shows the diff, apply saves a new agent version
A system prompt change is reviewed like any other code change. Illustration: Sulat.

Then I changed the prompt through the API directly, adding a line telling the agent to end every answer with a joke. That took the agent to version 3. The next plan flagged that the object had changed outside Terraform and proposed putting the prompt back. The flagged section listed only the version number going from 2 to 3. The prompt text appeared in the plan below it. Applying the plan restored my prompt and published version 4, so a revert is a new version and not a rollback.

Four steps: v1 first apply, v2 prompt edited, v3 edited outside Terraform, v4 Terraform puts it back
Reverting a change publishes a new version rather than rolling one back. Illustration: Sulat.

To check that the applied agent worked, I started a session on it through the API and sent this message:

Code
In one sentence, what is Terraform used for? Then say which colour the word colour should be spelled in your English.

The agent explained that Terraform is an infrastructure-as-code tool, then confirmed the word is spelled “colour” in NZ English. It had picked up the prompt Terraform applied. The run took a few seconds, and I deleted the session afterwards.

Two credentials, two kinds of resource

The docs split the resources by the credential they accept. The table below is from Anthropic’s page on how the provider behaves.

ResourcesWorkspace API keyAdmin API keyLogin with org:admin
Agents, environments, vaults, skills, memoryYesNoYes, with default scopes
Workspaces, members, external keys, telemetryNoYesYes
Service accounts, federationNoNoYes
From Anthropic’s documentation for the Terraform provider.

My workspace key managed the agent and environment without trouble. When I added a data source that lists workspaces, the API answered 401, saying the Admin API needs an Admin API key or an organisation-scoped key. The provider added that my run was authenticating as a key acting in one workspace. I didn’t test the organisation resources with an admin key.

The practical result is two provider blocks, one for each kind of credential. The docs also say the workspace your agents live in must exist before you run a plan, and they give a separate recipe for a workspace that Terraform creates.

Two boxes: organisation resources need org admin access, Managed Agents resources need a workspace key
One provider, two kinds of credential. Illustration: Sulat.

Destroy is not undo

My first terraform destroy stopped with an error and changed nothing. Deletion protection is on by default for agents and environments, and the message spells out why: archiving an agent can’t be undone, it archives the agent’s deployments too, and a new agent gets a new ID.

Terminal screenshot: terraform destroy errors with Agent is protected from deletion and explains how to archive or stop managing it
My first terraform destroy stopped here, with the agent untouched.

To go ahead, I set deletion_protection = false on both resources and applied that on its own, then ran destroy again. The environment was deleted and the agent was archived. The docs list what destroy does to other resources: a destroyed workspace is archived along with its Developer API keys, and service accounts and federation rules are archived permanently. To stop managing something without touching it, the error points to a removed block with lifecycle { destroy = false }, and the docs suggest prevent_destroy on anything a mistaken plan must never archive.

Trash can for a deleted environment, locked archive box for an agent archived for good; protection is on by default
Destroy deletes an environment and permanently archives an agent. Illustration: Sulat.

What ends up in state

The state file held the agent’s system prompt in plain text. I searched it for my API key and found none. Anthropic’s docs say secrets go in write-only arguments, which need Terraform 1.11 or later and whose names end in _wo. They also tell teams to keep state in an encrypted remote backend and to mark the variables that feed those arguments as ephemeral, because a saved plan records every other variable’s value.

The version requirement is stated two ways. Anthropic’s docs list Terraform 1.11 or later, while the registry page says 1.0 or later, with 1.11 needed only for write-only secrets. Everything I ran worked on 1.17.3.

Where it sits

Claude Managed Agents launched in beta on 8 April, according to Anthropic’s release notes. I’ve covered the team’s account of building it three times and the self-hosted private beta. On 1 December AWS announced Claude Managed Agents for Amazon Bedrock in preview, and the new provider already has resources for it.

Two things in the registry are worth knowing about. AWS’s own provider manages Bedrock Agents, a separate AWS product, through resources such as aws_bedrockagent_agent. And a different provider named MemoryStore/anthropic is listed under another publisher. Anthropic’s docs say anthropics/anthropic is the only official address and warn that a provider runs with access to your Anthropic credentials, so check the source line in your configuration and any lock file change.

Who it’s for

If you run Managed Agents across more than one workspace, or you want a prompt change reviewed before it reaches an agent, the provider does that now, and the plan output is the part I’d use first. Commit the lock file, because Anthropic says arguments can change during the beta. Keep deletion protection on for anything with deployments. A single agent edited by hand in the console doesn’t need it yet.

I didn’t run vaults, skills, memory stores, deployments, any of the organisation resources with an admin key, or the AWS, Bedrock and Google Cloud platforms. The results above cover one environment and one agent in one workspace.