VladRassokhin / intellij-hcl

HCL language support for IntelliJ platform based IDEs
Apache License 2.0
244 stars 47 forks source link

support terraform provider schema -json output #254

Open mdaniel opened 5 years ago

mdaniel commented 5 years ago

Prerequisites

Installation details

Related Links

This is related to #128, #131, hashicorp/terraform#20446 and is documented upstream as https://www.terraform.io/docs/commands/providers/schema.html#providers-schema-representation

I saw that you commented on hashicorp/terraform#17018 so I would guess you're already aware, but I'm creating this issue for clarity, or so it can be closed WONTFIX

Expected Behavior

I would guess so long as the filenames don't clash, the plugin can distinguish its own schema files from terraform's schema files because they have differing top-level keys (yours ".schema_version", theirs "format_version"). I actually would presume that terraform's would win in the case of conflict, since it can be that a project is running with a custom build of the aws provider, for example, and would want those completion attributes and documentation over the pre-generated ones

$ terraform providers schema -json > ~/.terraform.d/metadata-repo/terraform/model/providers/local-terraform-providers.json

then the completion for the providers in use by the project would be available (subject to the IJ restart, as documented in the readme)

Actual Behavior

The custom provider attributes, data sources, and resources are not known

gberche-orange commented 4 years ago

Propagated onto JetBrains issue tracker at https://youtrack.jetbrains.com/issue/IDEA-240192

/CC @VladRassokhin