Skip to content

Allow loading of on-disk provider schemas #828

Open
@tylerFowler

Description

@tylerFowler

Current Version

0.25.2

Use-cases

I have a use case where I have a number of org-private providers and would like to be able to distribute schemas for them alongside a base terraform-ls build in order to provide autocomplete support for these internal providers.

Attempted Solutions

A custom fork that embeds a set of schemas that are built out-of-band would not be doable for my usecase given organizational constraints.

Proposal

A simple solution might be to provide a flag to provider schemas on-disk that would augment or override the existing VFS schema store loading process in internal/schemas. This would allow us to distribute the schemas separately from the terraform-ls binary and avoid a long-lived fork.

For example:

$ terraform-ls serve -provider-schemas ./schemas.json -provider-versions ./versions.json

Admittedly having to provide two files is somewhat clunky, ideally the two can be combined into a single file and disassembled in code but I understand if there's opposition to that.

If there is interest in this solution or something like it, I would be interested in contributing such a feature since we need it sooner rather than later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestprovidersFunctionality related to Terraform providers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions