Terraform and HCL

Compatible with IntelliJ IDEA (Ultimate, Community), Android Studio and 16 more

Included In

Screenshot 1
Screenshot 2

Improved Terraform and OpenTofu support is tailored for developers, SREs, and DevOps teams, supporting infrastructure management with features like syntax highlighting, code completion, and real-time error checking. Streamline your infrastructure as code (IaC) workflow and boost productivity with comprehensive tooling designed to make development and deployment more efficient.

Features:

  • Autocompletion, including for third-party providers from the Terraform Registry.
  • HCL, HIL, TFTPL syntax highlighting and validation
  • Integrated documentation, including for third-party providers from the Terraform Registry.
  • 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
  • Better properties validation (type checking)
  • Working with dependent modules
  • Type-specific autocompletion in interpolations

What’s New

2024.3
  • Introduced support for OpenTofu, an open-source, community-driven alternative to Terraform. The IDE now supports .tofu files when OpenTofu is selected, enhancing Infrastructure as Code development with autocompletion for encryption methods, key providers, and inspections for unknown references, ensuring a more secure and efficient setup.
  • Terraform Run Configuration actions are now available through Search Everywhere, streamlining access and usability.
  • Added inspection to detect unused variables and locals in Terraform files, helping keep code cleaner and more maintainable.
  • Usage indicators now highlight variable usage across Terraform files, aiding visibility and navigation of variable dependencies.
  • Added warnings for unused resources, helping developers identify and manage redundant or inactive code.
  • Refined Terraform controls in Gutter (Init, Validate, Plan, Apply, Destroy) for a more predictable and intuitive configuration experience.
  • Improved Terraform Run Configuration form with streamlined options and settings, enhancing user experience.
  • A new option to create Terraform files directly from the Create File menu has been added, making it easier to start new configurations.
  • Git author name inlay hints are now available in Terraform files, aiding collaboration and author tracking within code.
  • The search for variables now prioritizes tfvars files, making variable management more efficient and reducing search noise.
2024.2
  • AI Full Line Completion for Terraform is now available, running locally on your machine without using external services. It is disabled by default but can be enabled for use. We appreciate your feedback to help improve the model (note that we do not learn from your data).
  • Basic operations, syntax highlighting, and code completion for Terraform are now available immediately, without waiting for indexing. You can start working right away.
  • Enhanced the quick help view for HCL in Terraform, making it more readable and informative.
  • Added a documentation tooltip that appears when hovering over a Terraform resource or attribute.
  • Enhanced performance of the Documentation tool window for faster updates and better visibility of progress.
  • Included the ability to use terraform fmt as an alternative to the default formatter.
  • Added support for composite extensions for .tfpl files. This allows automatic detection of the data language for templates based on composite extensions. For example, if a file has the extension .js.tftpl, the file will be recognized with JavaScript as the data language and tftpl as the primary language.
  • Added support for Terraform resource imports, allowing users to add and manage imported resources directly within the IDE, with automatic detection and matching of resource addresses.
  • Provided support for resolving and finding usages for included variables in Terraform projects. This feature allows users to see the final values of variables, navigate through variable references, and view environment-specific values. Additionally, it provides convenient navigation and refactoring options, enabling users to add or change values across all environments and generate necessary binding variables efficiently.
  • Added support for working with projects in the WSL context. If a project is located in WSL and opened from JetBrains IDE, the Terraform installed in the WSL distribution where the project resides is used.
  • Included support for optional parameters in Terraform variable definitions and module usage, including code completion and documentation.
  • Introduced "Deep search for variables" option in Settings | Advanced Settings to enable searching for variables in nested directories (with the ability to disable this behavior).
  • Added the ability to use Move Statement Up/Down for multiple selected blocks.
  • You can now specify tfvars in the Run configuration.
  • Terraform code completion for providers and HCL now scales with the tooltip window, fixing the issue of truncated documentation and enhancing the usefulness of quick documentation.
  • Added highlighting for corresponding parentheses in HCL, enhancing code readability and convenience.
  • The default path to the Terraform executable is now used if the path field is left empty in Settings. Additionally, you can now use the Test button to check the presence and version of Terraform.
2024.1
  • Improves code completion for a wide range of third-party Terraform providers from the Terraform Registry, supporting efficient coding.
  • Integrates support for the latest documentation of providers directly in the IDE, enabling quick learning and exploration.
  • Adds support for the Terraform Template Language (TFTPL), improving workflows for configuration files, scripts, and program codes.
  • Offers an option to integrate TFTPL files with preferred programming languages for improved templating flexibility.
  • Recommends running "terraform init" to initialize the working directory, improving code autocompletion and inspections with local, up-to-date metadata.
  • Enables moving expressions, lines, or blocks of code up or down within a file.
  • Support for the "Removed" block has been added.
  • Now automatically adds comment markers when a new line is inserted within a comment block.
  • HCL syntax checks improved.
  • Added support for the lifecycle meta-argument.
2023.3
  • Support for import block
  • Support for loop that produces objects
  • Completion in the nested attributes blocks
  • Updated metadata
2023.2
  • Fixed performance issues in the editor
  • Improved performance of variable suggestions
  • Support for access_policy block
2023.1
  • New metadata bundled for all official and most popular providers from Terraform Registry
  • Terraform intentions and quickfixes now provide intention preview
Feb 12, 2025
Version 243.24978.46

Rating & Reviews

3.1
137 Ratings (3,700,549 Downloads)
5
4
3
2
1

soufiane ghzal

27.01.2025

no support for terragrunt. Even a bare file with the extension .hcl is not recognized by default.

0

Antonio Masotti

16.12.2024

Used to be one of my favourite plugins but now links to outdated documentation in terraform, throws errors that are not, etc...

any plan to fix it?

0

Anonymous

10.12.2024

Ever since the introduction of openTofu, the terraform stuff is corrupted. I dont see the terraform get option anymore!!! Which has been very annoying. And even if I run terraform get in the terminal, nothing is being updated in the UI

0

Additional Information

Vendor:
Plugin ID:
org.intellij.plugins.hcl