pulumi / pulumi-component-provider-go-boilerplate

Apache License 2.0
15 stars 3 forks source link

Error referencing the plugin on windows with dotnet #28

Closed AaronMDavis closed 6 months ago

AaronMDavis commented 8 months ago

What happened?

Created the plugin using the make install command. Trying to use that plugin locally with a project results in an error unable to find the plugin at the get.pulumi.com address. After more testing, I added pulumi plugin install resource ${PACK} v${VERSION} -f ${GOPATH}/bin/${PROVIDER} to the install provider. Now I get a new error error: failed to load plugin C:\Users\Aaron\.pulumi\plugins\resource-xyz-v0.1.3\pulumi-resource-xyz.exe: loading PulumiPlugin.yaml: open C:\Users\Aaron\.pulumi\plugins\resource-xyz-v0.1.3\PulumiPlugin.yaml: The system cannot find the file specified.

Example

Clone the repo, update go version in the provider/go.mod file to 1.21 and the pulumi pkg and sdk package references to the latest. Run make install Add the package to a pulumi dotnet project. Try to run pulumi preview This will give you an error that the package can't be found at https://get.pulumi.com/releases/plugins/pulumi-resource-xyz-v0.0.1-windows-amd64.tar.gz

If you try to run pulumi plugin install resource xyz v0.0.1 --f {plugin location} and then attempt to run the preview. The error is now error: failed to load plugin C:\Users\Aaron\.pulumi\plugins\resource-xyz-v0.0.1\pulumi-resource-cybertron.exe: loading PulumiPlugin.yaml: open C:\Users\Aaron\.pulumi\plugins\resource-xyz-v0.0.1\PulumiPlugin.yaml: The system cannot find the file specified.

Output of pulumi about

CLI Version 3.91.1 Go Version go1.21.3 Go Compiler gc

Plugins NAME VERSION aws 4.38.1 azure-native 2.30.0 dotnet unknown xyz 0.0.1

Host OS Microsoft Windows 11 Pro Version 10.0.22621 Build 22621 Arch x86_64

This project is written in dotnet: executable='C:\Program Files\dotnet\dotnet.exe' version='8.0.100'

Dependencies: NAME VERSION Pulumi 3.60.0 Pulumi.AzureNative 2.30.0 Pulumi.xyz 0.0.1

Additional context

I should also note that this repo is out of date and did not work upon initial clone. I had to update the references to pulumi and go to get it working. Otherwise, everything else is the same.

Contributing

No response

VenelinMartinov commented 6 months ago

Hi @AaronMDavis, sorry you are having this issue. From your repro steps it looks like there's a mismatch between the provider name you use in pulumi plugin install and the binary name - you are using xyz and cybertron.

I think you might want to search and replace xyz with cybertron everywhere and then try to install it as pulumi plugin install resource cybertron v0.0.1 --f {plugin location}

LMK if you are still having issues with this.