pulumi/pkg/resource/deploy/providers
Fraser Waters 7ecd8a749c Don't try to install provider during schema loading unless missing
Fixes https://github.com/pulumi/pulumi-terraform-bridge/issues/1247

When running tfgen the provider plugin is generally only available on
PATH, not in the plugins directory. The schema loader was only checking
the plugins directory to decided if it had a resource provider already
installed, and so sent off lots of github requests to lookup latest
versions of plugins while running example conversion.

This changes the schema loader to use the same logic we use elsewhere
where we try to use the provider (which will also look at PATH) and then
if we get a missing plugin error we'll do the install and then try
again.

I've also moved the `SetKnownPluginDownloadURL` call into
workspace.InstallPlugin so we don't forget to call it before passing
specs in.

Finally I've also removed the InstallPlugin method from Host as the only
place it was used was in the schema loader, which is now using
workspace.InstallPlugin like everywhere else.
2023-06-28 14:12:17 +01:00
..
doc.go Document Go packages (#6009) 2021-01-11 11:07:59 -07:00
provider.go pkg/resource: Prefer Assertf in some subpackages 2023-02-21 15:13:48 -08:00
provider_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
reference.go pkg/resource: Prefer Assertf in some subpackages 2023-02-21 15:13:48 -08:00
reference_test.go ci: radical idea - what if slow tests & no stdout makes GH consider runner dead? 2022-03-06 14:52:13 -08:00
registry.go Send old inputs to diff and update 2023-06-21 21:04:50 +01:00
registry_test.go Don't try to install provider during schema loading unless missing 2023-06-28 14:12:17 +01:00