Terraform variable extractor
List every variable block in a Terraform file with its type, default and whether it is required.
Terraform variable extractor
Paste Terraform (HCL) code and this tool scans every `variable` block and lists its name, type, description, default value, and whether it is required or marked sensitive. It is built for the moment you inherit a module with dozens of variables and no documentation, or you need a checklist of exactly what a root module expects before you can run it.
Choose how the result is shaped with the output option: a table for a quick overview, a tfvars file you can drop straight into a working directory, or Markdown documentation ready to paste into a README. "Only required variables" narrows the list to the ones with no default, which is usually the shortest path to knowing what you actually have to supply. "Include sensitive variables" lets you drop anything marked `sensitive = true` when you are producing something you might share more widely. Sort the list by name or keep the order variables appear in the file, and switch how values are written between native HCL syntax and JSON with the value format option.
The tfvars output can pre-fill each line with the variable's own default value, or leave every line commented out as a template you fill in by hand — useful when you want a starting point without silently carrying defaults forward. Descriptions, types and nested type expressions like `object({...})` are read as written; the parser does not evaluate Terraform expressions, so a default that references another variable or a function call is shown as the raw expression rather than a computed value.
Everything runs locally in your browser — your Terraform code, including any variable names or defaults you consider sensitive, is never uploaded anywhere. When you are done, copy the result, download it as a .txt file, or send the output back into the input to keep refining it.