Hello I’ve got a multi language component building...
# general
b
Hello I’ve got a multi language component building and distributing into a number of tarballs for each platform which I can install with
pulumi plugin install resource $name $version -f mydist.tar.gz
However once installed I don’t understand what the point of installing it as a package is since doing that alone doesn’t let me import the component resources that are declared in that package. Is the point of
pulumi plugin install resource …
to allow the component resources to be imported in my language of choice or am I still expected to import via nuget/npm/pip etc as well?
b
every multi language component (and pulumi package for that matter) has 2 parts to it: • A provider binary, which lives in
~/.pulumi/plugins
• a language SDK You need both for things to work. The
pulumi plugin install
command installs the binary. We have something claled "plugin discovery" which means when you do
npm install
or
pip3 install
it will automatically acquire the plugin binary for you. You need to set the following property in the schema: https://github.com/jaxxstorm/pulumi-rke/blob/master/provider/resources.go#L91 however due to limitations with language metadata in packages, plugin acquisition from distinct URLs only works in Node and Python right now. We're working on making it better.
hopefully that answers your question?
b
yes very helpful
but in the case of resources, what does the provider binary do? For resources wouldn’t it be fine to just import the SDK?
b
for standard resources, you need the provider binary for the upstream cloud provider, so for example, if creating an S3 bucket, you need the aws provider binary multi language components are a little different, they look and feel like providers, so they have a binary too
there's some complex engine mechanisms to explain why they have one, but i haven't reminded myself of it for a while
b
haha ok - so basically the TLDR is make sure the resource plugin is installed and then also install the library ?
b
yep 🙂
b
awesome thank you