Wink Pings

Now you can terraform destroy an AI agent

Anthropic's Terraform provider has entered public beta. Agents, environments, workspaces, and members can all be written into .tf files; terraform plan shows the diff, and terraform destroy wipes everything with one command. There is one catch, though: you first have to turn off deletion protection.

Anthropic's Terraform provider has entered public beta. There is only one source address: anthropics/anthropic.

Terraform is HashiCorp's infrastructure-as-code tool set. You write the things you want to create into configuration files, terraform plan first tells you what it is going to change, and apply actually does it. That workflow now covers Claude.

The things it can manage fall into two parts. Under Managed Agents, environments, vaults, skills, memory stores, and deployments can all be defined. In the Admin API part, service accounts, Workload Identity Federation, and customer-managed encryption keys are also included. Workspaces and members can likewise be written into configuration, and someone in the comments was specifically praising the onboarding/offboarding of members.

The official docs give an example main.tf: define a sandbox environment with restricted network access and allow it to access package managers; then define an agent, bind a model, system prompt, and tools, and conveniently turn off web search and web fetch, because under a restricted network they won't get results even if enabled. Every change to an agent publishes a new version on the server, and the version field can be exported to pin a version. The docs also remind people that during beta, resource types and parameters may change, and recommend committing the lock file to the repo and deciding for yourself when to follow upgrades.

The most dramatic reply came from Jacob: he posted a screenshot and said he had just started writing a self-built provider 15 minutes earlier.

image

Terraform itself has mixed reviews. User gerry directly vents: it has become an industry standard, but it sucks, and infrastructure is just copy-paste. On the other side, Gnotnuk says now I can finally terraform destroy my agent, and honestly I might need that sooner or later. Put the two together and it's a bit interesting: the same action, one person feels they can finally get it under control, another feels they can finally delete it.

There is one detail for people who want to try it: the provider has deletion protection enabled by default, and terraform destroy will directly error out. You first have to set deletion_protection to false in the two resource blocks and apply once before you can destroy. Deleting an agent isn't so straightforward.

People in the comments are also asking how to handle setup scripts, network configuration, and environment variables for cloud environments, which shows the capabilities aren't fully covered yet. Beta is beta.

There is also a long reply worth looking at. A user posted their Ephemera plan based on AWS Bedrock, with a surprisingly similar approach: one IAM user is allowed to call only one model, a monthly budget alarm is configured as a fallback, and an OpenAI-compatible endpoint is used to connect clients. He only said one thing: same idea, just didn't handle tool use. Treating agents as infrastructure is not a need Anthropic just made up on a whim.

Agent configuration has gone from checkboxes and sliders in a backend UI to code that can go into git, be code reviewed, and be rolled back. This is the starting point for managing agents as assets. As for what it feels like to destroy a running agent, you have to have actually deleted one to know.

发布时间: 2026-12-04 11:30