4 ms·
Autocomplete for Terraform/HCL is available, too, though you do have to use specific tooling (e.g., VS Code with the Terraform extension) rather than the same t
by giaour 5y ago
Autocomplete for Terraform/HCL is available, too, though you do have to use specific tooling (e.g., VS Code with the Terraform extension) rather than the same tools you use to work on JS.
- jen20 5y agoThe specific tool recommended here is simply not very good - despite the language server efforts, the IntelliJ HCL plugin is worlds apart from the VS Code tooling (and has been for years). Unfortunately it's not open source - if it were it would mean the availability of an open source implementation of a production quality HCL2 parser for the JVM ecosystem, which would be very useful.
- sverhagen 5y agoI have really liked the Terraform support in IntelliJ, but the "HashiCorp Terraform / HCL language support" plugin seems to have had its most-recent release on July 17, 2020[1]. And it clearly does not support a bunch of the newer constructs and properties. And that's just very unfortunate. [1] https://plugins.jetbrains.com/plugin/7808-hashicorp-terraform--hcl-language-support https://plugins.jetbrains.com/plugin/7808-hashicorp-terrafor...
- jen20 5y agoAny examples of things that aren't supported? It doesn't need to embed the metadata per-resource anymore.
- sverhagen 5y agoI'm seeing errors on each.value.foo when using for_each. Also, this gives me errors: locals { foo = { for bar in local.bars: "${bar.x}.${bar.y}" => bar } } Then, optional(bool) is "is not a valid type constructor". Those all seem "language" aspects. For a resource like "github_branch_protection" it seems to not recognize the right properties. That seems to be more of provider issue.