Skip to main content

Terraform State Inspector

Parse and inspect Terraform state files to understand your infrastructure inventory. View resource counts by type, provider dependencies, module structure, and detect potential drift indicators like zero-instance resources. Paste your terraform.tfstate JSON — everything runs in your browser.

✓ Resource inventory ✓ Provider & module breakdown ✓ Drift indicators

Frequently Asked Questions

What is a Terraform state file?▼

Terraform state (terraform.tfstate) is a JSON file that maps your configuration's resources to real-world infrastructure objects. It records the IDs, attributes, and dependencies of every resource Terraform manages. Terraform uses the state to determine what changes are needed (plan), what to create/update/destroy (apply), and to track drift between your config and the actual infrastructure.

What is infrastructure drift in Terraform?▼

Drift occurs when the actual cloud infrastructure differs from what Terraform's state file records. This happens when resources are changed manually (AWS Console, CLI), by other tools, or by automatic cloud events (auto-scaling, security group updates). Terraform detects drift with 'terraform plan' — if the plan shows unexpected changes, that's drift. Regular 'terraform plan' runs in CI help catch drift early.

How do I safely inspect a remote Terraform state?▼

For S3 backends: 'terraform state pull > state.json'. For Terraform Cloud/Enterprise: use the TFC API or 'terraform state pull'. For Azure Blob or GCS backends, use their respective CLI tools. IMPORTANT: state files may contain secrets (database passwords, API keys) in plaintext. Never paste real state files into public online tools. This tool runs 100% in your browser — no data is sent to any server.

What does the state serial number mean?▼

The serial is a monotonically increasing integer that Terraform increments on every state modification. It's used to detect concurrent state modifications — if two Terraform runs try to update state simultaneously, the higher serial wins and the lower is rejected. A very high serial (100+) indicates the state has been modified many times, which can happen with aggressive automation or frequent manual interventions.

What is the difference between managed and data resources in state?▼

Managed resources (mode: 'managed') are created and controlled by Terraform — it creates, updates, and destroys them. Data sources (mode: 'data') are read-only references to existing infrastructure that Terraform queries but doesn't manage. Data sources are used to look up existing resources (like an AMI ID, VPC ID, or certificate ARN) to use in your managed resources.

Why are there resources with 0 instances in my state?▼

Zero-instance resources indicate a resource block exists in your configuration but no actual infrastructure was created. This happens when count = 0, when an optional resource block evaluates to empty, or when a resource has been tainted (marked for recreation). Run 'terraform plan' to see what action Terraform will take on these resources.

Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →