mirror of
https://github.com/hashicorp/terraform.git
synced 2026-04-28 17:48:59 -04:00
"ProviderMeta" is a niche feature that's used by only two providers, but this code was written under the assumption that the caller would always provide it for any provider that has a schema for it, and unfortunately the Terraform SDK seems to always provide a meta schema even for providers that don't use it, and thus it's empty. The current phase of the "unknown_instances" language experiment is not fully wired in to the main logic as a way to reduce the risk of it impacting behavior for those not participating in the experiment, but that means that right now it doesn't actually have a resolved ProviderMeta value to present, and so was just omitting it on the assumption that it is always optional to provide anyway. As a pragmatic stopgap to resolve that conflict, this makes the gRPC provider dispatching logic tolerate an absent ProviderMeta value and synthesize a null value to use in that case. This makes that logic slightly more robust and also means we can defer doing all of the work to weave ProviderMeta into this experimental codepath. The new TODO comment in that codepath is intended to remind us to consider this again should we decide to stablize the experiment later; when we do that, we'll hopefully do it by refactoring to share more code between the two codepaths, at which point ProviderMeta will be easier to support. |
||
|---|---|---|
| .. | ||
| convert | ||
| discovery | ||
| mock_proto | ||
| grpc_error.go | ||
| grpc_provider.go | ||
| grpc_provider_test.go | ||
| grpc_provisioner.go | ||
| grpc_provisioner_test.go | ||
| plugin.go | ||
| serve.go | ||
| ui_input.go | ||
| ui_input_test.go | ||
| ui_output.go | ||
| ui_output_test.go | ||