hashicorp / hashicorp/terraform-plugin-framework
Consider Exposing Framework Provider Metadata
- Dominant language
- Go
- Stars
- 384
- Forks
- 107
- Avg merge
- 3m
- Merged PRs (30d)
- 1
Description
### Background
The `terraform providers schema -json` command allows Terraform to output provider-based information in machine-readable JSON format. Terraform ecosystem tooling such as [terraform-plugin-docs](https://github.com/hashicorp/terraform-plugin-docs) and the [Terraform Language Server](https://github.com/hashicorp/terraform-ls), rely on this specification to operate. The command currently only exposes information surfaced from the Terraform Plugin Protocol's `GetProviderSchema` RPC and therefore has a tight dependency on Terraform core.
Since the provider schema information and other metadata are sourced from the providers themselves with no dependency on Terraform core, we can consider exposing a provider metadata function or RPC directly in the framework which provider developers can use to opt-in to outputting/exposing additional provider metadata.
### Use-cases
- Outputting framework specific types instead of [go-cty](https://github.com/zclconf/go-cty) types: https://github.com/hashicorp/terraform-plugin-framework/issues/182
- Indicate whether or not a resource supports importing: https://github.com/hashicorp/terraform-plugin-framework/issues/160
terraform-plugin-docs:
- https://github.com/hashicorp/terraform-plugin-framework/issues/625#issuecomment-1424690927
- https://github.com/hashicorp/terraform-plugin-docs/issues/156#issuecomment-1440414771
- https://github.com/hashicorp/terraform-plugin-docs/issues/333
- https://github.com/hashicorp/terraform-plugin-docs/issues/64
Contributor guide
Assessment
This issue has not been assessed yet.