Giter Club home page Giter Club logo

intellij-hcl's Introduction

IntelliJ-HCL plugin

Provides HCL language and Terraform configuration files (.tf) support for IntelliJ Platform-based IDEs

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

Plugin page in IntelliJ platform plugin repository.

DEPRECATION NOTICE

This project contains the original source code of the intellij-hcl plugin. The code in this repository is kept static and can be used for historical reference only: no pull requests will be accepted.

Though this repository is still used as issue tracker, so please create new issues here rather than in JetBrains tracker since plugin releases separately and it's simpler to track issues here.

TL/DR. Starting from plugin version 0.7.0, the sources belong to JetBrains and the plugin is closed-source. You can download the new versions of the free plugin from JetBrains from the JetBrains plugin repository.

Note from Plugin Author

I'd been developing this plugin for four years in my free time before last year, when it became obvious that due to lack of free time I could not keep up with the newest Terraform features.

Meanwhile, IaaC and especially Terraform is becoming more and more popular, so I decided to transfer the plugin ownership to JetBrains. I believe that JetBrains has the resources to improve the plugin over time and provide efficient user support.

I'd like to thank all users, contributors, people who spotted and reported bugs, and everyone who promoted the plugin all those years.

As part of the transition, the source code was moved to the main IntelliJ repository which is private. The JetBrains plugin is free. The main plugin features will be compatible with JetBrains' free IDEs ([IntelliJ IDEA, PyCharm]x[Community, Education] Editions) as well as Google's Android Studio. Note that the main features include but are not limited to the features below.

Features:

For both .hcl and .tf file formats:
  • Syntax highlighting
  • Structure outline in the 'Structure' tool window
  • Code formatter with the 'Reformat code' action available
  • Code folding
  • Comment/Uncomment action

Terraform configs (.tf) files

  • Interpolations syntax highlighting
  • (WIP) Properties validation (according to the properties required for resource/provider, type checking)
  • (WIP) Go to definition from resource to provider

Terraform configs Interpolation Language

  • Syntax highlighting
  • Autocompletion for predefined methods
  • (WIP) Go to declaration on resources, providers, properties, etc.

Planned features:

Terraform configs (.tf) files

  • Find usages for resources, providers, variables

Terraform configs Interpolation Language

Terraform External Metadata

Starting from version 0.6.14 it's possible to use external source of Terraform model. Previously plugins updates were necessary once something was updated in Terraform itself or providers.

Plugin reads metadata from specially-formatted json files located at (in order):

  • TERRAFORM_GLOBAL_DIR/schemas (intended for schemas for your custom providers/provisioners) and
  • TERRAFORM_GLOBAL_DIR/metadata-repo/terraform/model (semi-automatically updated schemas) and
  • Plugin itself

Here TERRAFORM_GLOBAL_DIR stands for $HOME/.terraform.d on Linux/macOS and %APPDATA%/terraform.d on Windows.

ℹ️ Recommended approach is to clone special repo as TERRAFORM_GLOBAL_DIR/metadata-repo and later update it from time to time.

⚠️ As of plugin version 0.6.14 IntelliJ restart is required once metadata is updated on disk

Linux/macOS user may use commands like:

# To initial clone
mkdir -p "$HOME/.terraform.d/"
git clone https://github.com/VladRassokhin/terraform-metadata "$HOME/.terraform.d/metadata-repo"

# To update metadata
git -C "$HOME/.terraform.d/metadata-repo" pull
# Don't forget to restart IntelliJ after that

intellij-hcl's People

Contributors

vladrassokhin avatar julia-alexandrova avatar matthew16550 avatar paulomigalmeida avatar serceman avatar umanshahzad avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.