Pulumi Packages are the core technology that enables cloud infrastructure resource provisioning to be defined once, in your language of choice, and made available to users in all Pulumi languages. If you’ve used a Pulumi cloud provider, including one of our new Pulumi native providers, you’ve used a Pulumi Package. But until today, Pulumi Packages only worked with Pulumi Resources: direct, low-level representations of individual cloud services like object storage. Many of us, however, enjoy creating Pulumi Components, which combine low-level resources into higher-level, more opinionated building blocks like the production-grade Kubernetes cluster component in Pulumi EKS. Unfortunately, those components, though powerful and unique to Pulumi’s IaC approach, were previously confined to a single language: so if your infrastructure team built a component in Python, your developers who might want to use TypeScript could not use it.
In Pulumi 3.0 Pulumi Components can now be authored in a fundamentally multi-language way, enabling you to write them once in your preferred language and make them available in all the other languages supported by Pulumi—all thanks to Pulumi Packages.
👉 Read on to learn more about Pulumi Packages, or jump right in and author your own with the user guide
Using Pulumi Packages
Pulumi Packages bring the full power of the modern cloud and the amazing creativity of the Pulumi Community to you. Using a Pulumi Package is easy: find one, install it into your project, and get started.
- Choose from any of Pulumi’s cloud provider packages in the Registry
- Install into your project with
go get [package-url]
- Reference a namespace in the newly-installed package and start writing code
Creating Pulumi Packages
You can use Pulumi successfully without ever creating a Pulumi Package. But, we’d love to have you join the community of Pulumi Package authors! Here’s a quick overview of how Pulumi Packages work and how to create one.
A Pulumi Package is comprised of two inputs: a Pulumi schema, which describes the resource model the package exposes, and the Resources or Components described in that schema. From those inputs, Pulumi Packages can generate language-specific SDKs and documentation and then package those into SDK packages (npm, NuGet, and Python packages) that can be published to a public or private package registry. Along the way, a resource provider plugin is also created. The plugin is used by the Pulumi engine to instantiate, configure, and destroy the Resources or Components defined by the package.
There are several different ways to author a Pulumi Package depending on the kind of cloud infrastructure you want to define:
- Native Pulumi Provider Package: Use the full features of the Pulumi resource model to create a provider for a new cloud platform. Examples: the
- Bridged Provider Package: Take an existing resource provider from another supported ecosystem (like a Terraform provider), and bridge it to be exposed as a Pulumi Package. Examples: the
- Component Package: Write a Pulumi Component in your language of choice and expose it to users in all Pulumi languages. Example: the
Together, these options provide a combination of breadth and depth for the kinds of resources and components that can be exposed to Pulumi developers via Pulumi Packages. In the weeks ahead, we have many improvements underway to make the authoring and publishing of packages much easier. We also look forward to your feedback on the overall experience!
Pulumi Packages are just one part of Pulumi’s Cloud Engineering Platform. Watch the PulumiUP! event for more.