Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Support HCL2 and Terraform 0.12 #155

Closed
mkuzmin opened this issue Jul 6, 2018 · 28 comments
Closed

Support HCL2 and Terraform 0.12 #155

mkuzmin opened this issue Jul 6, 2018 · 28 comments

Comments

@mkuzmin
Copy link

mkuzmin commented Jul 6, 2018

A preview of Terraform 0.12 and HCL2 with a bunch of new features and breaking compatibility changes have been announced.
They are planning to release it later this summer.

Our plugin needs to support it at some point.

@StephenKing
Copy link

seems like it's time to get started ;-)
https://github.com/hashicorp/terraform/releases/tag/v0.12.0-alpha1

@giladsh1
Copy link

giladsh1 commented Dec 5, 2018

We use this plugin on a daily basis.
would be awesome if it will support the new HCL2 format!

@cehrig
Copy link

cehrig commented Dec 8, 2018

+1, I don't like "First-Class Expressions" being marked as mistake

@tskotov
Copy link

tskotov commented Dec 13, 2018

+1 for HCL2/TF0.12 support!

@VladRassokhin
Copy link
Owner

"First-Class Expressions" being marked as mistake

@cehrig what do you mean?

@cehrig
Copy link

cehrig commented Dec 17, 2018

@mkuzmin
Copy link
Author

mkuzmin commented Dec 23, 2018

Check out https://www.youtube.com/watch?v=ZgXFlTZZaIg&list=PL4z1WbdlT5GKw1l2w0U-8YijoTwZp_GvU&index=5

Even if Terraform provides a migration tool, I'm sure we have plenty of places for useful inspections

@d-helios
Copy link

Terraform 0.12-beta1 now available! It will be nice to see HCL2 support in favourite IDE ))

@StephenKing
Copy link

@VladRassokhin we're heavy users of this great plugin and looking forward to Terraform 0.12.

Is there any way how we can help to sponsor development?

@suslovsergey
Copy link

if i can donate for resolving this issue - i will donate!

@VladRassokhin
Copy link
Owner

HCL2 (Terraform 0.12+) support will be part of IntelliJ-Terraform plugin for IntelliJ 2019.2 as plugin will become part of IntelliJ.

You can kinda-sponsor development - buy any JetBrains product.

@brikis98
Copy link

Looking forward to seeing this!

Is 0.12 support part of the 2019.2 EAP?

@Tom-Mann
Copy link

Don't see this in the 2019.2 intellij/pycharm releases ?

@bohdanyurov-gl
Copy link

TF 0.12 has been released: https://www.hashicorp.com/blog/announcing-terraform-0-12

@bohdanyurov-gl
Copy link

@VladRassokhin is there any estimated release date or an issue tracker?

@Acen
Copy link

Acen commented May 23, 2019

@VladRassokhin is there any estimated release date or an issue tracker?

There aren't any references within their tracker. https://youtrack.jetbrains.com/issues

Edit: It hasn't been added as part of the 2019.1.3 RC either.

@ajorpheus
Copy link

ajorpheus commented May 24, 2019

It appears there is an hcl2 branch for this plugin so @VladRassokhin has/had started working on it: https://github.com/VladRassokhin/intellij-hcl/tree/hcl2 but it was last updated in Aug, 2018 so not sure what state it's in.

@VladRassokhin
Copy link
Owner

As I've stated a bit early

HCL2 (Terraform 0.12+) support will be part of IntelliJ-Terraform plugin for IntelliJ 2019.2

Unfortunately not yet in 2019.2 EAP 1, though I'll investigate whether it's possible to publish plugin on plugins.jetbrains.com (build compatible with 2019.2 EAP or 2019.1.2)

All necessary code for HCL2 is already there, however it's not open-source

@ajorpheus
Copy link

though I'll investigate whether it's possible to publish plugin on plugins.jetbrains.com (build compatible with 2019.2 EAP or 2019.1.2)

This will be awesome.

Unfortunately (or fortunately), I've found the Terraform integration in Intellij to be much better than VS Code and that's pretty much due to how well this plugin works.

@bowczarek
Copy link

bowczarek commented May 28, 2019

As some guys told that already above, TF/HCL support in IJ is awesome, thanks a lot for your great work!
Me and my teammates are also waiting for TF0.12/HCL 2.0 support since we already migrated our code base because of so many great features and finally expressions treated as first class citizens.

Having that said @VladRassokhin do you have any sort of ETA when a new plugin may come up, either for 2019.1.2 or 2019.2 EAP as you mentioned already, apart from final 2019.2 release that is scheduled for July :( ?

@OGProgrammer
Copy link

Please fix it Vlad! JetBrains should pay this man.

@VladRassokhin
Copy link
Owner

VladRassokhin commented May 30, 2019

I've uploaded version 0.7.0 to plugins repository.
It's compatible with IntelliJ platform 2019.1+, please try it out.

Possible caveats: new templates syntax (%{}).
Please report bugs if any.

@bohdanyurov-gl
Copy link

@VladRassokhin looks like TF 0.12 is supported only partially, code navigation or inspections do not work.

Anyway, thank you for uploading it, at least it does not try to mark every template as broken now :)

@VladRassokhin
Copy link
Owner

@bohdanyurov-gl Examples maybe? It's hard to see what you mean since I'm not developing Terraform configs daily.

@benosman
Copy link

benosman commented May 30, 2019

@VladRassokhin

Thanks for your work on this plugin!

A couple of things I noticed that have some issues:

image

  • Complex lookups inside templates show as unresolved references. The new template system allows for some very dynamic code which is likely impossible for the plugin to determine, very often though they are highlighted red due to being unresolved.

image

@bohdanyurov-gl
Copy link

bohdanyurov-gl commented Jun 4, 2019

@VladRassokhin
Even trivial constructions don't work:
image

IDEA does not see "locals.foo" as a reference to the local variable.

Example for tf 0.11 syntax:
image

I'm using latest IDEA (2019.1.3 Ultimate) and TF (v0.7.2) plugin

@bohdanyurov-gl
Copy link

Update: sorry for confusion. Looks like I was using v0.7.1, latest one works

@VladRassokhin
Copy link
Owner

Please open new issues if problems arises

Repository owner locked and limited conversation to collaborators Jun 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests