JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Languages and frameworks: Terraform

Last modified: 09 May 2024

Terraform is an open-source tool that enables developers and operations teams to define, manage, and provision cloud resources and infrastructure components with code as opposed to manual configuration through a cloud provider's UI.

With it, you manage infrastructure resources, such as virtual machines, networks, and storage, in a declarative and automated manner. The replacement of manual configuration with codified templates ensures consistent and reproducible infrastructure setups.

JetBrains Rider provides the following features:

  • Syntax highlighting

    You can customize color settings in the Settings/Preferences dialog (CtrlAlt0S) , on the Editor | Color Scheme | HCL and Editor | Color Scheme | HashiCorp Interpolation Language pages.

  • Code formatting

    You can access code style settings related to Terraform in the Settings/Preferences dialog (CtrlAlt0S) on the Editor | Code Style | Terraform page.

  • Inspections

    You can detect duplicate, conflicting, deprecated, or missing elements, unresolved references, and more.

    Terraform missing property inspection

    You can check all Terraform inspections in the Settings/Preferences dialog (CtrlAlt0S) under Editor | Inspections | Terraform.

  • Code completion

    This includes completion for known providers, resources, data sources, and arguments.

    Terraform resource completion
  • Code navigation

    Select a module or a variable and press F12 to navigate to its usages.

    Terraform find usages
  • Refactorings

    To rename the element and all its usages, press Ctrl0R,0R.

  • Structure view

    Use the Structure tool window to quickly preview and navigate Terraform files.

    Terraform Structure

    The tool window is available in View | Tool Windows | Structure or by pressing CtrlAlt0T.

  • Quick Documentation

    Hover over an argument to get quick documentation for it.

    Terraform quick documentation

    The window that pops up contains a link to Terraform Registry for more details. You can also open this link by pressing ShiftF1.

Coding assistance also includes brace matching Ctrl0], code folding Ctrl0M,0E/Ctrl0M,0S, adding line comments CtrlAlt0/ and block comments CtrlShift0/.