VladRassokhin / intellij-hcl

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

Add new provider autocompletion resource #307

Open nfx opened 4 years ago

nfx commented 4 years ago

@VladRassokhin, would it be possible to add autocompletion for Databricks provider?

VladRassokhin commented 4 years ago

It's enough to adjust terraform-metadata project to generate metadata for your provider. New provider definition needs to be added to providers.base.json.

phumberdroz commented 4 years ago

I actually tried this for a 3rd party provider https://github.com/aiven/terraform-provider-aiven

I added

  "aiven": {
    "repository": "https://github.com/aiven/terraform-provider-aiven",
  },
  "keycloak": {
    "repository": "https://github.com/mrparkers/terraform-provider-keycloak",
  }

but I am not sure if this is correct since I am erroring

Cloning https://github.com/aiven/terraform-provider-aiven
make: *** [schemas] Error 128

And there is no error log

G-Rath commented 4 years ago

Would be good at somepoint to support terraform-ls to make autocompletion more dynamic

vicky17d commented 3 years ago

@VladRassokhin Is there another way to add new custom schemas to be picked up by the plugin? Currently, as you have mentioned, new schemas can be added terraform-metadata. But this needs to be done for every machine. Asking 100s of engineers to clone this repo on their machines may not be the best idea. Also, we cannot add the internal schemas to this repo.

We customize IntelliJ IDEA for all our engineers and we do validate JSON files with certain schemas, and IntelliJ SDK has JsonSchemaFileProvider for us to add custom schemas. If terraform plugin also exposes some extension points like this, that would be great. Any plans to do that in future? Or some other approach? Thank you.

vicky17d commented 3 years ago

Bump