Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Terragrunt Language ServerNew to Visual Studio Code? Get it now.
Terragrunt Language Server

Terragrunt Language Server

Bahram Joharshamshiri

|
6,294 installs
| (0) | Free
VSCode extension for Terragrunt HCL language support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Version

Installs

Rating

Terragrunt HCL Language Server

Rich, context-aware editor support for the Terragrunt 1.x configuration model — completions, validation, hover docs, clickable navigation, and a visual lineage graph.

This is a community-supported project. It is not affiliated with Gruntworks, Inc. or the Terragrunt project, but it tracks the official Terragrunt documentation closely and follows the current 1.x regime.

Install Terragrunt Language Server from the VS Code Marketplace, or build the extension from this repository.

Terragrunt HCL Language Server

Features

  • Context-aware completions for blocks, attributes, functions, locals, dependencies, includes, features, values, units, and stacks
  • File-kind-aware validation that knows the difference between a unit, an explicit stack, a values file, and an autoinclude — with current-regime diagnostics that flag removed and deprecated syntax
  • Hover documentation and clickable document links for includes, dependencies, and read files
  • Show Terragrunt Lineage Graph — a visual, interactive graph of the whole workspace covering includes, dependencies, units, nested stacks, and reading lineage, with dependency outputs surfaced from state
  • Syntax highlighting for Terragrunt blocks, attributes, references, and functions

The lineage graph opens with the first two levels visible, provides filter and expand/collapse controls, preserves the filter between views, uses full-row targets, and reports loading and empty states explicitly. Open is shown only for files inside the active workspace.

What it understands

  • terragrunt.hcl and named shared unit configurations such as root.hcl
  • terragrunt.stack.hcl explicit stacks
  • terragrunt.values.hcl generated stack values
  • terragrunt.autoinclude.hcl and terragrunt.autoinclude.stack.hcl

Getting started

  1. Install the extension from the VS Code Marketplace.
  2. Open any .hcl file in a Terragrunt workspace — completions, validation, hover, and links work immediately.
  3. Run Show Terragrunt Lineage Graph from the Command Palette while an HCL editor is active to see how the units in your workspace include, depend on, and read each other.

Terragrunt 1.x first

Root configurations should use named includes and explicit filenames:

include "root" {
  path = find_in_parent_folders("root.hcl")
}

Explicit stacks are recognized through terragrunt.stack.hcl:

unit "network" {
  source = "../catalog/network"
  path   = "network"
}

unit "app" {
  source = "../catalog/app"
  path   = "app"

  autoinclude {
    dependency "network" {
      config_path = unit.network.path
    }
  }
}

The implementation tracks the official Terragrunt blocks, attributes, functions, and stacks documentation.

Development

Install dependencies and create the extension bundle:

npm install
npm run webpack

For continuous development, rebuild on source changes:

npm run watch

Launch the repository as a VS Code Extension Development Host after bundling it. Test completion, diagnostics, hover, and document links with current Terragrunt HCL files, or open the lineage graph from the Command Palette while an HCL editor is active.

Contributions are welcome — bug reports, feature ideas, and pull requests all help. The parsing and language-service engine is developed separately in tghclparser and published as a standalone npm package, so fixes there flow into the extension.

Thanks

Thanks to everyone who has reported issues, tested, and contributed feedback:

  • and-win
  • rtizzy
  • lucalooz
  • gsouf
  • jonath92
  • mateothegreat
  • prestonr83
  • jimweller
  • AntonSedna
  • vizorich

License

MIT. See LICENSE.

This is a community-supported project and is not affiliated with Gruntworks, Inc. or the Terragrunt project. You can support the project by starring it on GitHub or contributing to it. Pull requests are welcome.

Buy Me a Coffee at ko-fi.com

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft