HashiCorp Terraform / HCL language support

Compatible with: IntelliJ IDEA PhpStorm WebStorm PyCharm RubyMine AppCode CLion GoLand DataGrip Rider MPS Android Studio
Jan 09, 2019
276 485
This plugin adds support for HashiCorp Configuration Language (HCL) and HashiCorp Interpolation Language (HIL), as well as their combination used in Terraform configuration files (.tf).

The HCL format is also used for Nomad (.nomad files).


For file formats using HCL (.hcl, .tf, .nomad):

  • Syntax highlighting
  • Structure outline in the 'Structure' tool window
  • Code formatter with the 'Reformat code' action available
  • Code folding
  • The 'Comment/Uncomment' action

For HIL files:

  • Syntax highlighting

Terraform specific support:

In both configuration files and interpolations:

  • Autocompletion
  • Find Usages / Go to definition for resources, providers, variables and their properties
  • Rename Refactoring
  • Introduce Variable Refactoring (for string property values)
  • Several inspections
  • Report usage of deprecated properties
  • Unresolved reference checks (in interpolations)
  • Check required/missing properties in resource/provider
  • Predefined Terraform methods autocompletion in interpolations
  • (WIP) Better properties validation (type checking)
  • (WIP) Working with dependent modules
  • (WIP) Type-specific autocompletion in interpolations

Recent change notes

  • Fixed order of unary and select operations in interpolations (#179)
  • Improved formatting (#141)
  • Fixed exception in properties completion (#182)
  • Improved local modules resolving
  • Reduced plugin memory consumption, speed up completion/inspections
  • Updated model data to match Terraform v0.11.11