Loading Terraform State Viewer...
Please wait a moment

How to View Terraform State Files - Step by Step Guide

Step 1

Upload Your Terraform State File

Start by loading your Terraform state file (.tfstate). The state file is a JSON file that contains information about your infrastructure managed by Terraform:

Upload file: Click "Upload" to select your .tfstate file from your local machine
Paste JSON: Copy the contents of your state file and paste directly into the editor
Try sample: Click "Sample" to see an example Terraform state file with AWS resources
⚠️

Security Note: All processing happens in your browser. Your state files never leave your computer and are not sent to any server.

Step 2

Browse Your Infrastructure Resources

Once loaded, the viewer automatically parses your state file and displays all resources:

Resource list: View all resources in a clean table format
Type & provider: See resource types (aws_instance, aws_s3_bucket) and providers
Resource IDs: View actual infrastructure IDs and identifiers
Statistics: See Terraform version, serial number, and resource counts
Step 3

Search and Filter Resources

Easily find specific resources in large state files:

Search by type: Find all resources of a specific type (e.g., "aws_instance")
Search by name: Locate resources by their Terraform names
Search by ID: Find resources using their actual infrastructure IDs
Instant filtering: Results update as you type in the search box
Step 4

Export to Excel

Export your Terraform state data for offline analysis, documentation, or sharing with your team:

Excel format: Click "Excel" to download .xlsx file
Two worksheets: Resources table + Statistics sheet
Filtered export: Export only the filtered results if you've used search
Documentation ready: Perfect for audit logs, team reviews, and compliance

Frequently Asked Questions

What is a Terraform state file?

A Terraform state file (.tfstate) is a JSON file that stores information about your infrastructure. It maps your Terraform configuration to real-world resources and tracks metadata like resource IDs, dependencies, and outputs.

Is it safe to upload my state file?

Absolutely! This tool runs entirely in your browser - no data is sent to any server. Your state files, including all secrets and infrastructure details, remain completely private on your machine. You can verify this by disconnecting from the internet and the tool will still work.

Where do I find my Terraform state file?

Local state files are in your Terraform directory (terraform.tfstate). For remote state (S3, Terraform Cloud), use terraform state pull > state.tfstate to download it. Never commit state files to version control as they may contain sensitive information.

Can I view remote state from S3 or Terraform Cloud?

Yes! First pull your remote state using terraform state pull to save it as a local JSON file, then upload that file to the viewer. This works with all Terraform backends including S3, Azure, GCS, and Terraform Cloud.

What information can I see about each resource?

You can see resource type, name, provider, mode (managed/data), and the actual resource ID from your cloud provider. The Excel export includes full attribute details. For HCL validation and formatting, check out our HCL Formatter and HCL Validator tools.

Is the Terraform State Viewer free?

Yes, completely free with no limitations on file size, number of resources, or usage frequency. No registration required, and you can view unlimited state files with full export capabilities.