1Password / pulumi-onepassword

Pulumi provider for 1Password.
Apache License 2.0
16 stars 1 forks source link

Could not automatically download and install resource plugin 'pulumi-resource-onepassword' #39

Closed socratesx-asimov closed 1 month ago

socratesx-asimov commented 1 month ago

Hello,

We migrated to this plugin recently, but we are getting the error on the title whenever we run pulumi locally or in a CI environment:

 % pulumi preview
Please choose a stack, or create a new one: dev
Previewing update (dev):
     Type                             Name              Plan     Info
     pulumi:pulumi:Stack              test-project           2 messages
     └─ pulumi:providers:onepassword  default_1_1_2              1 error

Diagnostics:
  pulumi:pulumi:Stack (test-project):
    (node:4834) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
    (Use `node --trace-deprecation ...` to show where the warning was created)

  pulumi:providers:onepassword (default_1_1_2):
    error: Could not automatically download and install resource plugin 'pulumi-resource-onepassword' at version v1.1.2, install the plugin using `pulumi plugin install resource onepassword v1.1.2`: error downloading provider onepassword to file: failed to download plugin: onepassword-1.1.2: 403 HTTP error fetching plugin from https://get.pulumi.com/releases/plugins/pulumi-resource-onepassword-v1.1.2-darwin-arm64.tar.gz

We need to always install the plugin version manually before running pulumi:

% pulumi plugin install resource onepassword v1.1.2 --server github://api.github.com/1password
% pulumi version
v3.128.0

Maybe it is a configuration mistake somewhere that causes pulumi to miss the real location of the plugin and falls back to the default get.pulumi.com.

From what I can see in package.json configuration: https://github.com/1Password/pulumi-onepassword/blob/cf2047659ace08b3f6d3b59c76164cd7965a2c76/sdk/nodejs/package.json#L28

It specifies the 'server' directive, but this parameter is missing from the pulumi package schema: https://www.pulumi.com/docs/using-pulumi/pulumi-packages/schema/

Perhaps the pluginDownloadURL should be used instead?

edif2008 commented 1 month ago

Hey @socratesx-asimov!

Thank you for raising this with us. Indeed, it has been a mistake on our side with the binary installation command. And I really appreciate you providing a possible URL that actually works. We have #41 which resolves this.

socratesx-asimov commented 1 month ago

Hey @socratesx-asimov!

Thank you for raising this with us. Indeed, it has been a mistake on our side with the binary installation command. And I really appreciate you providing a possible URL that actually works. We have #41 which resolves this.

Hi @edif2008, thanks for the quick reply and for looking at this. I checked your PR and it makes clear in the docs. But perhaps we can avoid installing the plugin manually using the cli cmd. Please check here: https://www.pulumi.com/docs/using-pulumi/pulumi-packages/how-to-author/#support-for-github-releases.