Hi <@U088N7494KU> wondering are there any examples...
# general
l
Hi @astonishing-architect-11492 wondering are there any examples of pulumi executable provider used without Pulumi registry. Or is it not possible ?
a
Hi Maxim, here are the docs for building an executable provider. It links to this boilerplate repo, which walks you through the process end-to-end. You don't have to publish to the Pulumi registry for this. For distribution you can host the binary anywhere and set
pluginDownloadURL
in the schema to point at the location of the binary.
l
I have tried this but when I host the binary in github releases its not clear how to install this using
pulumi package add
https://www.pulumi.com/docs/iac/cli/commands/pulumi_package_add/ When plugin name is specified it looks in Pulumi Registry. When github is specified it doesn't use releases and installs provider directly essentially using it as source-based plugin
a
Right,
pulumi package add <http://github.com/|github.com/><org>/<repo>
is the source-based path, not a fetch-from-releases shortcut. For an executable plugin distributed via GitHub releases, point
package add
at the schema and let
pluginDownloadURL
handle the binary: 1. In
schema.json
, set:
Copy code
"pluginDownloadURL": "<github://api.github.com/><org>/<repo>"
2. Host the schema somewhere reachable (your release assets work) and run:
Copy code
pulumi package add <https://github.com/><org>/<repo>/releases/download/v0.1.0/schema.json
Pulumi reads the schema to generate the SDK, then uses
pluginDownloadURL
plus name/version to pull the binary at runtime. The release assets need to follow
pulumi-resource-<name>-vX.Y.Z-<os>-<arch>.tar.gz
.
l
@astonishing-architect-11492 does this use github token to auth to private github repos?
@happy-analyst-7672 can you help with that?I am trying to understand how to get pulumi to download
schema.json
file from private repository. There seem to be no direct support in CLI for that.
a
pulumi package add
doesn’t currently support fetching
schema.json
from a private GitHub repo. So the schema needs to be either publicly reachable, downloaded locally first and passed as
./schema.json
, or served from somewhere the CLI can access directly. The provider binaries themselves can still be private via
pluginDownloadURL
.