Skip to content

Commit c2d2ede

Browse files
authored
Add plugins concept page and integrate plugin references across docs (#16406)
This change introduces a new concept page explaining Pulumi's plugin architecture and updates related documentation to reference it. The plugins page covers all five plugin types (resource, language, analyzer, converter, and tool plugins), installation and management, and implementation details. Related documentation updates: - how-pulumi-works.md: Add reference to language plugins - providers.md: Explain providers as resource plugins - converters.md: Reference converter plugins and clarify standalone tools - policy/_index.md: Reference analyzer plugins 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 8eda720 commit c2d2ede

File tree

5 files changed

+121
-8
lines changed

5 files changed

+121
-8
lines changed

content/docs/iac/concepts/how-pulumi-works.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ In the next section, we will describe each of these components and see how they
3434

3535
## Language hosts
3636

37-
The _language host_ is responsible for running a Pulumi program and setting up an environment where it can register resources with the _deployment engine_. The language host consists of two different pieces:
37+
The _language host_ is responsible for running a Pulumi program and setting up an environment where it can register resources with the _deployment engine_. Language hosts are implemented via [plugins](/docs/iac/concepts/plugins/) (specifically, language plugins). The language host consists of two different pieces:
3838

3939
1. A language executor, which is a binary named `pulumi-language-<language-name>`, that Pulumi uses to launch the runtime for the language your program is written in (e.g. Node or Python). This binary is distributed with the Pulumi CLI.
4040
2. A language SDK is responsible for preparing your program to be executed and observing its execution in order to detect resource registrations. When a resource is _registered_ (via `new Resource()` in JavaScript or `Resource(...)` in Python), the language SDK communicates the registration request back to the _deployment engine_. The language SDK is distributed as a regular package, just like any other code that might depend on your program. For example, the Node SDK is contained in the [`@pulumi/pulumi`](https://www.npmjs.com/package/@pulumi/pulumi) package available on npm, and the Python SDK is contained in the [`pulumi`](https://pypi.org/project/pulumi/) package available on PyPI.
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title_tag: Plugins
3+
meta_desc: Learn about Pulumi plugins, the core extensibility mechanism that enables Pulumi to work with cloud providers, languages, and tools.
4+
title: Plugins
5+
h1: Plugins
6+
meta_image: /images/docs/meta-images/docs-meta.png
7+
menu:
8+
iac:
9+
name: Plugins
10+
parent: iac-concepts
11+
weight: 140
12+
concepts:
13+
weight: 140
14+
---
15+
16+
{{% notes type="info" %}}
17+
Most Pulumi users don't need to understand plugins in depth, as most plugin installation and management happens automatically.
18+
19+
If you're interested in learning more about Pulumi internals, see the [Pulumi Developer Documentation](https://pulumi-developer-docs.readthedocs.io/latest/docs/architecture/plugins.html).
20+
{{% /notes %}}
21+
22+
Plugins are Pulumi's core extensibility mechanism, allowing the Pulumi engine to communicate in a uniform manner with various languages, resource providers, and other tools. Plugins always run as separate processes and mostly use gRPC for communication with the Pulumi engine.
23+
24+
## Plugin types
25+
26+
Pulumi supports five categories of plugins:
27+
28+
### Resource plugins
29+
30+
Resource plugins (also known as [providers](/docs/iac/concepts/resources/providers/)) expose standardized interfaces for managing cloud resources. A listing of providers is available in the [Pulumi Registry](/registry/).
31+
32+
When you first run `pulumi preview` or `pulumi up`, the Pulumi CLI will install any required providers that are not already in your plugin cache.
33+
34+
### Language plugins
35+
36+
Language plugins (also known as language hosts) host programs written in specific languages, enabling the Pulumi engine to execute your Pulumi code without understanding language-specific details. As described in [How Pulumi works](/docs/iac/concepts/how-pulumi-works/#language-hosts), language plugins consist of:
37+
38+
1. A language executor binary named `pulumi-language-<language-name>`, which Pulumi uses to launch the runtime for your program's language (e.g., Node.js or Python). This binary is distributed with the Pulumi CLI.
39+
1. For all languages except YAML, a language SDK that prepares your program for execution and observes resource registrations.
40+
41+
Pulumi-supported language plugins are installed automatically with the Pulumi CLI. Community-supported language plugins can be installed separately.
42+
43+
### Analyzer plugins
44+
45+
Analyzer plugins scan Pulumi programs for potential issues and power [Pulumi Policy as Code](/docs/insights/policy/). These plugins enable you to enforce compliance, security, and best practices across your infrastructure.
46+
47+
Policy plugins are installed automatically with the Pulumi CLI.
48+
49+
### Converter plugins
50+
51+
Converter plugins transform existing infrastructure-as-code from other tools (like Terraform, Kubernetes YAML, or CloudFormation) into Pulumi programs. Learn more about [conversion tools](/docs/iac/guides/migration/converters/).
52+
53+
Converter plugins are installed automatically with the Pulumi CLI when you run the [`pulumi convert`](/docs/iac/cli/commands/pulumi_convert) command.
54+
55+
### Tool plugins
56+
57+
Tool plugins enable integration between Pulumi and external tools, extending Pulumi's capabilities to work with your existing workflows and toolchains.
58+
59+
## Plugin installation and management
60+
61+
### Automatic installation
62+
63+
The Pulumi CLI normally handles plugin installation automatically. For example:
64+
65+
- **Resource plugins** (provider binaries) are installed automatically when you first run `pulumi preview` or `pulumi up` if they are not already present in the plugin cache
66+
- **Language plugins** are installed with the Pulumi CLI
67+
- **Policy plugins** are installed with the Pulumi CLI
68+
- The Pulumi CLI ensures your resource plugins are present when you run your Pulumi program
69+
70+
### Manual installation
71+
72+
Most users will not need to run the [`pulumi plugin install`](/docs/iac/cli/commands/pulumi_plugin_install/) command manually. However, manual plugin installation can be useful for scenarios like:
73+
74+
- Pre-loading plugins on a custom Docker image to speed up CI/CD pipelines
75+
- Working in air-gapped environments
76+
- Testing pre-release versions of plugins
77+
- Installing plugins that are community-maintained
78+
79+
### Plugin storage
80+
81+
Plugins are stored in different locations depending on their type:
82+
83+
- All plugins that ship with the Pulumi CLI, including all of our supported **Language plugins** and **policy plugins** are stored in `~/.pulumi/bin`
84+
- All plugins that are installed by the user, whether explicitly or automatically by the Pulumi CLI, are cached in `~/.pulumi/plugins`
85+
86+
### Plugin management commands
87+
88+
You can manage your local plugin cache using the following CLI commands:
89+
90+
- [`pulumi plugin ls`](/docs/iac/cli/commands/pulumi_plugin_ls/) - List installed plugins
91+
- [`pulumi plugin rm`](/docs/iac/cli/commands/pulumi_plugin_rm/) - Remove cached plugins
92+
- [`pulumi plugin install`](/docs/iac/cli/commands/pulumi_plugin_install/) - Manually install a plugin
93+
94+
## Plugin implementation details
95+
96+
Plugins are deployed through two approaches:
97+
98+
- **Executables** following the naming convention `pulumi-<kind>-<name>` (e.g., `pulumi-resource-aws`)
99+
- **Directory-based plugins** containing a `PulumiPlugin.yaml` configuration file, where the engine uses the specified runtime to execute the plugin through the language plugin's interface
100+
101+
For more details about Pulumi plugin architecture and how to contribute to plugin development, see the [Pulumi Developer Documentation](https://pulumi-developer-docs.readthedocs.io/latest/docs/architecture/plugins.html).
102+
103+
## Related topics
104+
105+
- [Providers](/docs/iac/concepts/resources/providers/) - Learn more about resource plugins (providers)
106+
- [How Pulumi works](/docs/iac/concepts/how-pulumi-works/) - Understand how plugins fit into Pulumi's architecture
107+
- [Policy as Code](/docs/insights/policy/) - Learn about analyzer plugins for policy enforcement
108+
- [Conversion tools](/docs/iac/guides/migration/converters/) - Use converter plugins to migrate from other IaC tools

content/docs/iac/concepts/resources/providers.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ A resource provider handles communications with a cloud or SaaS service to creat
2121

2222
Providers are composed of two parts: an executable, which makes the actual call to the cloud provider's API, and an SDK, which allows you to consume the provider in the language of your Pulumi program. When you run your Pulumi program, Pulumi passes your code to a language host such as Node.js, waits to be notified of resource registrations, assembles a model of your desired state, and calls on the provider executable to produce that state. The resource provider translates those requests into API calls to the cloud service.
2323

24+
{{% notes type="info" %}}
25+
Providers are a specific type of [plugin](/docs/iac/concepts/plugins/) called a resource plugin. For more information about plugins and how they work in Pulumi, see the [plugins concept page](/docs/iac/concepts/plugins/).
26+
{{% /notes %}}
27+
2428
## Installing Providers
2529

2630
There are two methods for installing a provider and using it in your Pulumi program:
@@ -38,7 +42,7 @@ The most common method of installing a provider is to use your language's packag
3842
- .NET: `Pulumi.Aws`
3943
- Java: `com.pulumi.aws`
4044

41-
After installing the provider using your package manager, you reference the provider in your Pulumi program to define the desired state of the resources for that provider. When you install the SDK for a provider (e.g., via `npm install <package_name>` in Node.js), the package manager (npm in this example) automatically downloads and installs the provider executable along with the SDK if the executable is not already cached on your system.
45+
After installing the provider using your package manager, you reference the provider in your Pulumi program to define the desired state of the resources for that provider. When you first run `pulumi preview` or `pulumi up`, the Pulumi CLI will install any required providers that are not already in your plugin cache.
4246

4347
### Installing a Parameterized Provider via `pulumi package add`
4448

content/docs/iac/guides/migration/converters.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ aliases:
1616
- /docs/iac/adopting-pulumi/converters/
1717
---
1818

19-
The `pulumi convert` command allows you translate supported sources to the various [languages that Pulumi supports](/docs/languages-sdks/), such as TypeScript, JavaScript, Go, Python, C#, or Java.). Conversion sources are supported via a plugin model, and include other IaC tools like Terraform. Pulumi YAML programs can also be converted to any other supported Pulumi language.
19+
The `pulumi convert` command allows you to translate supported sources to the various [languages that Pulumi supports](/docs/languages-sdks/), such as TypeScript, JavaScript, Go, Python, C#, or Java. Conversion sources are supported via [Pulumi plugins](/docs/iac/concepts/plugins/#converter-plugins), and include the ability to convert code from other IaC tools like Terraform and Azure Bicep. Pulumi YAML programs can also be converted to any other supported Pulumi language.
2020

2121
For the detailed usage of this command and options, refer to the [pulumi convert CLI documentation.](https://www.pulumi.com/docs/cli/commands/pulumi_convert/)
2222

@@ -39,17 +39,14 @@ For the detailed usage of this command and options, refer to the [pulumi convert
3939

4040
### Use cases for using pulumi convert
4141

42-
The `pulumi convert` subcommand is designed to address a variety of migration and conversion scenarios where IaC practices evolve alongside your project needs. Here are some common use cases:
42+
The `pulumi convert` command is designed to address a variety of migration and conversion scenarios where IaC practices evolve alongside your project needs. Here are some common use cases:
4343

4444
* **Migrating from other IaC tools:** If you're looking to transition your infrastructure definitions from tools like Terraform, Bicep, or ARM templates into Pulumi.
4545
* **Converting from Pulumi YAML:** If you started your project with Pulumi YAML and find your requirements have evolved, you can convert and take advantage of the benefits offered by popular programming languages, such as complex logic capabilities and the flexibility to create modular and reusable components.
4646

4747
### Additional conversion tools and resources
4848

49-
The following list of web-based tools and resources can quickly help you convert your source IaC languages or formats for use with the `pulumi convert --from` command. The resulting file can be copied or downloaded for use with a [new Pulumi project](/docs/get-started/).
49+
In addition to the converter plugins, Pulumi offers the following standalone tools for converting code from other IaC tools to Pulumi:
5050

51-
* [Terraform to Pulumi](/tf2pulumi/)
52-
* [ARM to Pulumi](/arm2pulumi)
5351
* [Kubernetes CustomResources to Pulumi](/blog/introducing-crd2pulumi/)
5452
* [CloudFormation to Pulumi](/cf2pulumi/)
55-
* [Kubernetes YAML to Pulumi](/kube2pulumi/)

content/docs/insights/policy/_index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ aliases:
2222

2323
Pulumi Policy empowers you to set guardrails to enforce compliance across your entire cloud infrastructure—whether resources are managed by Pulumi IaC, provisioned by other tools like Terraform or CloudFormation, or created manually. Using Policy as Code, you can write flexible business and security policies that protect your organization.
2424

25+
{{% notes type="info" %}}
26+
Policy as Code is implemented via [analyzer plugins](/docs/iac/concepts/plugins/#analyzer-plugins), which are installed automatically with the Pulumi CLI.
27+
{{% /notes %}}
28+
2529
Policy enforcement works in two modes:
2630

2731
- **Preventative policies**: Block non-compliant resources before deployment, enforcing compliance on Pulumi stack updates

0 commit comments

Comments
 (0)