# Terraform state inspector

- Human page: https://happytails.ai/en/developer-tools/terraform-state-inspector/
- Markdown: https://happytails.ai/en/developer-tools/terraform-state-inspector.md
- Structured JSON: https://happytails.ai/agents/en/developer-tools/terraform-state-inspector/index.json
- Visibility: public

## Tool capabilities

| Property | Value |
| --- | --- |
| Tool ID | `terraform-state-inspector` |
| Category | developer-tools |
| Implementation | Registered implementation. Registration alone is not a production-quality guarantee. |
| Browser execution | Use the visible action or interactive controls. |
| Browser processing | Browser; see tool notes for network behavior. |
| HTTP API | Not callable through HTTP. |
| Browser-agent interface | run_current_tool |

### Implementation notes

Inspects a terraform.tfstate file on your device and masks secrets before showing anything. Up to 5,000,000 characters; nothing is uploaded.

### Inputs and settings

Text input: terraform.tfstate.

Example or placeholder shown in the interface (not a validated fixture):

```text
{"version": 4, "terraform_version": "1.9.5", "resources": [...]}
```

Paste the content of terraform.tfstate. Up to 1,000,000 characters. Review the settings before running.

| Setting | Meaning | Control type | Default | Constraints |
| --- | --- | --- | --- | --- |
| `sensitivePaths` | Extra attribute names to mask | textarea | "" |  |

### Browser-agent workflow

1. Open the human page in a browser that supports WebMCP.
2. Discover the interface exposed by that page; use its actual schema.
3. Select files on the page first when the tool requires files.
4. Call `run_current_tool` with valid input and settings.
5. Inspect the returned result or error and the displayed output. Retrieve files from the displayed download links.

Calls do not automatically copy or download results. Browser permissions still apply. Interface availability alone is not proof of successful execution.

### Planning specification

Up to 5,000,000 characters of state JSON. Everything runs on your device in a background worker and nothing is uploaded. Downloads: JSON report, CSV inventory, SVG dependency graph and a masked copy of the state.

This describes intended requirements. Use the implementation notes, interface schema and observed output to determine current support.

### Complete machine-readable capability record

```json
{
  "id": "terraform-state-inspector",
  "category": "developer-tools",
  "built": true,
  "requirements": "Up to 5,000,000 characters of state JSON. Everything runs on your device in a background worker and nothing is uploaded. Downloads: JSON report, CSV inventory, SVG dependency graph and a masked copy of the state.",
  "implementation": {
    "fields": [
      {
        "key": "sensitivePaths",
        "label": "Extra attribute names to mask",
        "value": "",
        "type": "textarea",
        "help": "Optional. Attribute names to mask in addition to Terraform sensitive markers and secret-like names, separated by spaces, commas or new lines."
      }
    ],
    "registrationFamily": "config-infrastructure-json",
    "inputMaxLength": 5000000,
    "inputErrorCode": "CONFIG_INFRASTRUCTURE_JSON_TOO_LONG_STATE",
    "note": "Inspects a terraform.tfstate file on your device and masks secrets before showing anything. Up to 5,000,000 characters; nothing is uploaded.",
    "experience": {
      "automatic": false,
      "single": false,
      "inputMaxLength": 1000000,
      "inputMode": "text",
      "label": "terraform.tfstate",
      "placeholder": "{\"version\": 4, \"terraform_version\": \"1.9.5\", \"resources\": [...]}",
      "help": "Paste the content of terraform.tfstate. Up to 1,000,000 characters. Review the settings before running.",
      "action": null
    },
    "mode": "explicit",
    "interactive": false
  },
  "execution": "Browser interface",
  "api": null,
  "browser_agent": {
    "supported": true,
    "name": "run_current_tool",
    "discovery": "WebMCP on the human page in a supporting browser",
    "verification": "See audit/API-AUDIT.md; availability is not verification"
  }
}
```

## Page guide

Inspect a terraform.tfstate file on your device: list resources, modules, providers and outputs, see how resources depend on each other, and get a copy with secrets masked.

How can we improve this tool?

Report a problem or share an idea.

Please leave out private information. Your message and the tool name go to our team via PostHog.

### How to use Terraform state inspector

1. Paste the content of terraform.tfstate (state format version 4).
2. Optionally add attribute names to mask in addition to the built-in rules.
3. Run the inspection and review resources, dependencies and tainted instances.
4. Download the JSON report, CSV inventory, dependency graph or masked state.

## Useful next steps

- [JSON response redactor](https://happytails.ai/en/developer-tools/json-response-redactor/) ([Markdown](https://happytails.ai/en/developer-tools/json-response-redactor.md))

- [JSON path inventory](https://happytails.ai/en/data-tools/json-path-inventory/) ([Markdown](https://happytails.ai/en/data-tools/json-path-inventory.md))

- [JSON diff](https://happytails.ai/en/developer-tools/json-diff/) ([Markdown](https://happytails.ai/en/developer-tools/json-diff.md))

## What is read

Happytails.ai reads the version 4 state layout written by Terraform 0.12 and later, as described in the Terraform state documentation (developer.hashicorp.com, read on 16 October 2026): resources with their module, mode, type, provider (with its alias and the module that declares it) and instances, recorded dependencies, tainted status and outputs.

### Masking

Before anything is shown, values Terraform marked in sensitive\_attributes and sensitive outputs are replaced with (sensitive). Attributes whose names look like secrets, such as password, token, private\_key, client\_key, access\_key or connection\_string, are masked too, including a whole list or object stored under such a name, and you can add more names. Masking is a safety net: review the masked state before sharing it.

### Limits

The state is never sent anywhere and Terraform is not run. Dependencies are the ones Terraform recorded in the state, so implicit provider ordering is not shown. The graph draws up to 300 resources.
