DevOps & Config

HCL / Terraform Inspector

Parse HCL2 and Terraform to JSON and inspect resources and variables.

  • Nothing savedInput and output stay in memory and are gone when you leave this page.
  • Runs in your browserProcessing happens in this page. No application server receives your input.

HCL / Terraform configuration

Summary

Targets
HCL2, Terraform 1.9
Resources
โ€”
Data sources
โ€”
Variables
โ€”
Outputs
โ€”
Modules
โ€”
Providers
โ€”

Declared blocks

KindTypeNameProviderKey attributes
Nothing is listed until the input gives a result.

What This Tool Inspects

Parses HCL2 to JSON inside a dedicated worker and classifies a Terraform configuration into its declared resources, data sources, variables, outputs, modules, and providers. Extracts syntactic references between blocks and solves the resulting dependency wave order.

Target specification: HCL2, Terraform 1.9

Scope & Evaluation Limits

It parses; it does not evaluate. Expressions are returned as the strings they were written as, so count, for_each, dynamic blocks, conditionals, and every function (merge, jsonencode, templatefile) are shown verbatim and not resolved. That is hcl2-json-parser's own contract and it is the right one here: evaluating Terraform expressions needs variable values, a provider schema, and in several cases the state, none of which exist in a browser. Consequently the resource count is the number of declared blocks, not the number of instances a plan would create. No terraform plan, no state file, no provider schema, no registry lookup, no .tfvars merging, no module resolution: a module block's source is reported and never fetched. Reference extraction is syntactic: it finds aws_s3_bucket.logs.arn inside an expression string, and it will miss a reference built by string concatenation and will report one that appears inside a comment-like string literal. Attribute-level depends_on is read; implicit ordering through a provider alias is not modelled.

  • Evaluating HCL2 expressions (count, for_each, dynamic, merge, jsonencode, templatefile)
  • Fetching remote modules or provider schemas
  • Reading Terraform state or merging .tfvars files

Lint Rules (8)

RuleSeverityFires when
HCL/undefined-variableerrorvar.x referenced with no variable "x" block in the input
HCL/circular-referenceerrorThe reference graph has a cycle
HCL/hardcoded-secretwarningA string attribute matches classifySecret
HCL/no-version-constraintwarningA required_providers entry or a module source with no version
HCL/unpinned-module-sourcewarningA module source pointing at a Git ref that is a branch rather than a tag or commit
HCL/deprecated-interpolationinfo"${var.x}" wrapping an entire string, which HCL2 has not needed since Terraform 0.12
HCL/no-descriptioninfoA variable or output with no description
HCL/unused-variableinfoA declared variable nothing in the input references

Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.