Terraform Resource Explorer
List all resources, data sources, variables, outputs, and locals in your Terraform HCL code with cross-reference detection
Enter your Terraform HCL code to explore resources, variables, outputs, and dependencies
What is the Terraform Resource Explorer?
The Terraform Resource Explorer is a client-side tool that parses your Terraform HCL code and lists all defined blocks: resources, data sources, variables, outputs, and locals. It also detects cross-references between resources, helping you understand dependency relationships in your infrastructure configuration.
How to Use
- Paste your Terraform HCL configuration into the input field
- Click "Explore" or wait for automatic processing
- Review each section: Resources, Data Sources, Variables, Outputs, Locals
- Check the Cross-References section to see how resources depend on each other
- Use the summary to get a quick count of all block types
Example: Multi-Resource Terraform Configuration
This configuration demonstrates resources with cross-references that the explorer will detect:
resource "aws_vpc" "main" {
cidr_block = var.vpc_cidr
}
resource "aws_subnet" "public" {
vpc_id = aws_vpc.main.id
cidr_block = "10.0.1.0/24"
}
resource "aws_security_group" "web" {
name = "web-sg"
vpc_id = aws_vpc.main.id
}
resource "aws_instance" "web" {
ami = data.aws_ami.latest.id
instance_type = var.instance_type
subnet_id = aws_subnet.public.id
vpc_security_group_ids = [aws_security_group.web.id]
}
data "aws_ami" "latest" {
most_recent = true
owners = ["amazon"]
}
variable "vpc_cidr" {
type = string
default = "10.0.0.0/16"
}
variable "instance_type" {
type = string
default = "t3.micro"
}
output "instance_ip" {
value = aws_instance.web.public_ip
description = "Public IP of the web server"
}
locals {
environment = "production"
name_prefix = "myapp"
} What Terraform Block Types Are Supported?
- Resources — Infrastructure objects managed by Terraform (aws_instance, aws_s3_bucket, etc.)
- Data Sources — Read-only references to existing infrastructure (data.aws_ami, data.aws_vpc, etc.)
- Variables — Input parameters with optional types, defaults, and descriptions
- Outputs — Named values exported from the configuration for other modules or users
- Locals — Named expressions for intermediate values and reducing repetition
- Cross-References — Detected dependencies between resources (e.g., aws_instance → aws_security_group)
Use Cases
- Audit large Terraform configurations to understand their structure
- Verify all expected resources are defined before applying changes
- Identify unused variables or outputs during code review
- Map dependencies between resources for documentation or diagramming
- Onboard new team members by giving them a quick inventory of the infrastructure
How Cross-References Work
The explorer detects when one resource references another by scanning attribute values for
known resource identifiers. For example, if an aws_instance uses
aws_security_group.web.id in its configuration, the explorer reports that
dependency as a cross-reference. This helps visualize the implicit dependency graph
without running terraform graph.
Privacy and Security
All parsing and analysis happens entirely in your browser using JavaScript. Your Terraform code — which may contain resource names, variable values, and infrastructure details — is never transmitted to any server. No data is stored, logged, or shared.
Frequently Asked Questions
What does the Terraform Resource Explorer show?
The explorer lists all resources (with type and name), data sources, variables (with type and default values), outputs (with values and descriptions), and locals defined in your Terraform configuration. It also detects cross-references between resources, showing how they depend on each other.
What are cross-references and how are they detected?
Cross-references indicate dependencies between Terraform resources. For example, if an aws_instance references aws_security_group.web.id in its vpc_security_group_ids, the explorer detects that the instance depends on the security group. This helps visualize the dependency graph of your infrastructure.
Is my Terraform code sent to any server?
No. All parsing and analysis happens entirely in your browser using JavaScript. Your Terraform code — which may contain resource names, variable values, and infrastructure details — never leaves your device. No data is stored, logged, or transmitted.
What Terraform block types are supported?
The explorer supports all common Terraform block types: resource, data, variable, output, locals, module, provider, and terraform blocks. It recognizes any valid HCL syntax regardless of the cloud provider.
Can I explore multi-file Terraform configurations?
The explorer processes one input at a time. For multi-file configurations, paste the contents of each .tf file separately or concatenate them. The HCL parser handles multiple blocks in a single input without issues.
What is the maximum input size supported?
The explorer accepts Terraform files up to 2MB. Files between 200KB and 2MB will show a warning that processing may be slow. For typical Terraform configurations under 200KB, analysis is instant.
How is this different from terraform state list?
This tool analyzes your HCL source code (the .tf files you write), while terraform state list shows resources that have been deployed. Use this tool to understand your configuration structure during development without needing a Terraform state file or cloud credentials.
Does the explorer detect variable references like var.name?
The cross-reference detection identifies references between resources (e.g., aws_instance.web referencing aws_security_group.web.id). Variable references (var.name) and local references (local.name) within attribute values are recognized as part of the dependency analysis.