Publishing Pulumi packages
Pulumi packages can be published to two different registries depending on your use case:
- Your organization’s Private Registry in Pulumi Cloud, for components and providers used within your organization.
- The public Pulumi Registry, for open-source packages shared with the Pulumi community.
Publish to your organization’s private registry
Pulumi Cloud’s Private Registry lets platform teams publish components for discovery and reuse across their organization. Published components appear in a browsable gallery with auto-generated API documentation.
Before you begin
- You need a Pulumi Cloud account on the Enterprise or Business Critical plan.
- Your component must be pushed to a GitHub or GitLab repository that Pulumi can access. Private repositories are supported.
- If you haven’t built a component yet, see Build a Component. To choose the right packaging approach for your needs, see Packaging Components. For guidance on how to group multiple components into packages and repositories, see Repository strategy for Pulumi packages.
Publish your component
Use the pulumi package publish command to publish a component to your organization’s private registry:
pulumi package publish github.com/<org>/<component-name>
To publish a specific version, tag your repository and specify the version:
git tag v1.0.0
git push origin v1.0.0
pulumi package publish github.com/<org>/<component-name>@1.0.0
Learn more
For the full details on component versioning, README requirements, API docs annotations, authentication with private repositories, and more, see the Private Registry documentation.
To set up automated publishing via CI/CD, see Publishing from GitHub Actions.
Publish to the public Pulumi Registry
This section covers how to publish a Pulumi Package to the public Pulumi Registry. You can publish the following types of packages:
- A component or related group of components
- A custom provider where you define the CRUD operations for each resource type
- A bridged provider, which wraps an existing Terraform provider and leverages its code to perform the CRUD operations for each resource type
Prerequisites
- You need to install Pulumi.
- You should be familiar with the Pulumi Resource and Component model.
- Pulumi Packages are multi-language: you can write your package once in either Go, Python, or TypeScript/JavaScript and then make it available to all Pulumi users, even if they use another language. To develop them, you need to have Git, Go, .NET, Python, and TypeScript installed on your system.
- To follow the whole guide, you need a GitHub account. However, using GitHub is not a requirement; you may still find this guide useful even if you use another system to store your source code.
Create a repository and author your package
To get started, create a repository for your Pulumi Package. We recommend hosting your Pulumi Package in a public repository on GitHub. We also recommend following the naming conventions below to help the community find the source code for your packages.
Select a template
We’ve created some template repositories for you to use as a starting point for your package. These templates are for provider-based packages. If you are building a cross-language component (recommended for most platform teams), see Packaging Components for the recommended approach.
Click the link for the boilerplate repository template that you want to use, then click “Use this template” to make a copy of it.
- Author a custom Pulumi provider:
pulumi/pulumi-provider-boilerplate - Bridge an existing Terraform Provider to use with Pulumi:
pulumi/pulumi-tf-provider-boilerplate
Name your provider and repository
When you publish to the Pulumi Package Registry, you will need to pick a unique name. This is normally named after the cloud provider or service the provider configures.
Your repository name should start with pulumi- followed by the name of your provider e.g. pulumi-aws for AWS, or pulumi-kubernetes for the Kubernetes provider.
- If you’re bridging a Terraform provider, re-use the Terraform provider’s name - replacing
terraform-provider-withpulumi-e.g. usepulumi-auth0for bridgingterraform-provider-auth0. - If you’re building a component on top of an existing provider, consider using the provider name followed by the component name. For example, if building an API Gateway component using the AWS provider, name your project
pulumi-aws-apigateway.
Author your resources or components
See the instructions in your new repository’s README.md file for specific instructions on how to author your package. We also have guides you can follow for building components and providers without the template repos.
Write documentation
We recommend writing documentation to help others in the Pulumi community use your package. In your repository, there should be a docs/ folder containing markdown files (the templates include a few suggested pages). The files should correspond to the various tabs on a package page in Pulumi Registry (like the Azure Native package). Use the guidance in the following sections to author content in these pages.
Overview, installation, & configuration
Specifically, you should author a few pages:
_index.md, which will be shown on the Overview tab for your package. The title of this page should match the package display name and is the heading shown on the package detail page. The Overview is a great place to include a description of what your package does, a simple example, and any other details that you want prospective users of your package to know to be successful.installation-configuration.md, which will be shown on your package’s Installation & Configuration tab. Use this page to describe how to set up your package, including authenticating to a cloud provider, and to list the configuration options that can be used with your package. The title of this page should be in the form<Package display name> Installation & Configuration.
README.md and _index.md similar or the same, save for the YAML metadata/front-matter that’s in _index.md.Package metadata
Metadata for your package is generated from the schema.json in your repository. To make sure your package looks great in the Pulumi Registry, don’t forget to add metadata like:
displayName: the friendly name for your package displayed on the Registry’s browse page; this name should match the title of the_index.mdfile.description: a short description of your package; it should include the package namelogoUrl: a web-accessible URL to a logo for your package (ideally an SVG); we recommend using the githubrawcontent.com URL for a logo stored in your package’s repository; all surrounding whitespace should be removed from the logo, and wordmarks are preferredpublisher: your personal/company name, as you’d like it to be shown on Registrykeywords:category/CATEGORY: replaceCATEGORYwith one ofcloud,database,infrastructure,monitoring,network,utility,versioncontrolkind/KIND: replaceKINDwith one ofnative,component- Note: don’t set a kind if you’re bridging a Terraform provider
pluginDownloadURL: a web-accessible URL that contains the compiled binary plugin associated with your package; for more information see Publish your package
${VERSION}, ${OS} and ${ARCH} with their respective values if found in pluginDownloadURL.API docs
API docs for your package are automatically generated from the schema.json in your repository. Many Pulumi users learn to use a Pulumi Package via the API docs, since they appear automatically in many IDEs’ auto-complete and inline documentation features, like Visual Studio Code’s IntelliSense feature. Investing in API docs for your package is one of the best ways to improve its usability. Check out the pulumi-eks schema to see how it translates to the Pulumi Registry for an example of great API docs.
How-to guides
You can also create how-to guides for your packages by contributing them to the pulumi/examples repository on GitHub.
Publish your package
Once you’ve authored and tested your package locally, you can publish it to make it available to the Pulumi community. You must publish several artifacts:
- The npm, NuGet, Java, and Python SDK packages to the npm Registry, the NuGet Gallery, Maven Central and the Python Package Index
- If your package is hosted on GitHub, you may choose to use our custom Action for publishing Pulumi packages
- The Go module to your Git repository, by adding a tag, which we’ll explain in the sections below
- The binary Pulumi resource provider plugin to a binary hosting provider of your choice
- The package documentation - overview, installation & configuration, API docs, and how-to guides to Pulumi Registry
The URL used to download a plugin is derived from pluginDownloadURL, as specified in the schema. Pulumi expects to find a plugin at
${pluginDownloadURL}/pulumi-${kind}-${name}-v${version}-${os}-${arch}.tar.gz
name: the name field specified in the schemaversion: the version field specified in the schemakind: the kind specified in schema, probablyresourceos: the target operating system (one ofdarwin,linux,windows)arch: the target system architecture (one ofamd64,arm64)
Pulumi packages consist of SDKs, as well as a binary to facilitate the actual task (creating cloud resources, etc.). Package
managers (npm, NuGet, Pip, GitHub) host the SDKs, but we need to know where the plugin is hosted. When a package embeds its
pluginDownloadURL, we can automatically fetch the plugin. This means that pulumi up just works, and there is no need to run
pulumi plugin install ${NAME} ${VERSION} --server ${pluginDownloadURL}. If pluginDownloadURL is not supplied, then the Pulumi
CLI assumes the plugin is hosted at get.pulumi.com.
Support for GitHub releases
Since release 3.35.3, Pulumi understands a special form of pluginDownloadURL to download plugins via GitHub releases
github://${github api host}/{organization}[/{repository}]
github api host: the address of a GitHub API, forgithub.comthis isapi.github.comorganization: the GitHub organization to userepository: the GitHub repository to use, this defaults topulumi-${package name}
For example the Pulumiverse Astra package would specify github://api.github.com/pulumiverse.
Support for Gitlab releases
Since release 3.56.0, Pulumi understands a special form of pluginDownloadURL to download plugins via Gitlab releases
gitlab://${gitlab api host}/{<project_id>}
gitlab api host: the address of a Gitlab API, for Gitlab SaaS this isgitlab.comproject_id: the Gitlab project ID to use. The project ID can be found right below the project name on the project page.
Publish the documentation
All package documentation in the Pulumi Registry is published via the pulumi/registry repository on GitHub. To publish your package to the Pulumi Registry:
- Fork and clone the
pulumi/registryrepository. - Add your package to the community package list
- Add your package’s GitHub repo slug, e.g.
"checkly/pulumi-checkly" - Add the path to your package’s
schema.jsonfile from the root of your provider repository, e.g."provider/cmd/pulumi-resource-checkly/schema.json"
- Add your package’s GitHub repo slug, e.g.
- Open a pull request with the above changes and await review from a Pulumi team member.
schema.json (or .yaml).From there, a Pulumi employee will work with you to get your Pulumi Package published. To do so, they’ll:
- Review your pull request and trigger the automation that builds the package listing and the API docs from your schema.
- Merge upon approval of your PR
- On merging, CI will automatically publish your package listing and API docs to pulumi.com/registry.
Thank you for your feedback!
If you have a question about how to use Pulumi, reach out in Community Slack.
Open an issue on GitHub to report a problem or suggest an improvement.