mirror of https://github.com/pulumi/pulumi.git
b85a92cd5c
Plugins are the core means by which Pulumi may be extended. Language hosts, resource providers, analyzers, and converters, for instance, are all kinds of plugin. Plugins are loaded by a plugin `Host`, which also offers convenience methods for loading specific kinds of plugin such as those mentioned above. The `Provider` method on `Host` currently accepts a name and version. This is not ideal, since there are several other parameters that may affect the plugin to be loaded, as well as what operations may be run on it when it is loaded: * Custom download URLs and checksums may be desirable to control where a plugin is retrieved from, and to verify a plugin's integrity. * Parameterization means that while the `aws` provider is desired, it is actually provided by a dynamically-bridging `terraform` plugin which is to be supplied with a parameter such as `{"name":"aws","version":"..."}`. This PR begins reworking the `Host` interface so that its `Provider` method accepts a more complete `PackageDescriptor`, consisting of a full `PluginSpec` and an optional `Parameterization`. Presently this PR just replicates existing call sites to use the new data structure -- if this merges successfully then several of these call sites can likely be cleaned up further by moving duplicated logic that handles things like custom download URLs, etc. _into_ the newly capable `Provider` implementation. |
||
---|---|---|
.. | ||
mapper.go | ||
mapper_client.go | ||
mapper_server.go | ||
plugin_mapper.go | ||
plugin_mapper_test.go |