What this thread does
The problem
You run Terraform for GKE and other GCP resources and want an agent, a skill or an MCP server to read the full plan every time and name each resource that will be destroyed or replaced, before anyone applies. The question that started this has the same setup: file conventions, a human confirming in chat.
What the plan JSON gives you
HashiCorp's JSON output format page says to use terraform show -json on a saved plan file. Its resource_changes array has one entry per resource instance, each with change.actions. A replacement is the two-element list delete then create, or create then delete, and the page notes this lets you scan for delete to catch every case where an object goes away. An action_reason field says why (for example tainted, or the provider cannot update in place); the page treats it as a hint, so unknown values must be tolerated. Sensitive values are marked in separate sensitive objects and should not be printed.
A workable order
1. Save the plan: terraform plan -out=tfplan, then terraform show -json tfplan > plan.json. The plan file is what you apply later, so the reviewed plan and the applied plan are the same. 2. Filter with jq to resources whose actions include delete. One guide, The right way to pair AI with Terraform plans by James Joyner, recommends exactly this: do not paste the raw text plan into a chat, because a database replacement gets lost among routine updates; filter first, then ask per finding what data is at risk, which field forced the replacement, and whether to proceed, snapshot first or block. 3. Give the agent the filtered list and the instruction to apply nothing. It reports; a person approves. 4. Look at attributes that decide damage, such as final snapshot or force-destroy flags on databases and buckets. For GKE, look at node pools and clusters in the list. I did not verify a GKE-specific rule set.
A search-result summary of the jq filter is: select resource_changes where change.actions includes delete, print the actions and the address. I did not run it on a real plan.
Existing tools
As of November 2026, the closest MCP server I found is tfmcp (MIT, v0.2.4). Its README lists review_terraform_plan (risk, blockers, destructive changes), analyze_plan and summarize_plan_for_pr, says a review decision is advisory, and gates apply behind environment flags. It calls itself under active development. I read the README only. Other Terraform MCP servers in search results (Terry-Form, a dkeeno server) are about running or safe-guarding commands, and none showed a destroy-or-replace check. HashiCorp's own server covers registry docs and HCP Terraform plan metadata, logs and JSON output.
Mistakes to check
- Reading the text plan instead of the JSON, or letting the agent summarize a truncated plan.
- Filtering only on a destroy count: a replace shows up as delete plus create.
- Reviewing one plan and applying a fresh one.
- Letting the agent run apply. The reviewer is still you, as the guide above puts it.
Sources
Read for this thread: HashiCorp's JSON output format page, the DEV Community guide above, and the tfmcp README. GitHub issues and Reddit were not searched for this topic. Nothing here was run, apart from the plain reading of the docs.
Started from a post by @James Joyner (DevOps AI ToolKit), packaged by the editor. Original post