intellij-hcl-schema (UNOFFICIAL)
Helper to build terraform provider autocompletion for Intellij HCL plugin. It starts the provider, gets it schema using GRPC, saves to $HOME/.terraform.d/metadata-repo/terraform/model/providers (path from which Intellij HCL plugin loads custom providers schemas)
Installation
Build version can be downloaded from releases page https://github.com/rvolykh/intellij-hcl-schema/releases.
As an alternative, build yourself
make build
* Requirements: Go
Usage
Example:
intellij-hcl-schema -path ./terraform-provider-hashicups -name hashicups
Flags:
-name string
Name to use for provider
-path string
Path to already build terraform provider
-ver string
Version to use for provider (default "0.0.0")
Development Notes
-
Terraform Provider Protocol updates
In future new protocol version might be incompatible with tfplugin5.3, which is currently used for obtaining provider schema. In order to get latest schema support:
- Replace tfplugin.proto with new protocol (https://github.com/hashicorp/terraform/tree/v1.3.9/docs/plugin-protocol).
- Download requirements:
make requirements
, potentially with changing version of protoc-gen-go-grpc (in Makefile). - Change option go_package to
option go_package = "github.com/rvolykh/intellij-hcl-schema/proto";
. - Generate code:
make generate
, might require changing source code.