pulumi-plugin
Manage Pulumi plugins
TLDR
List all plugins on the downloaded cache
List plugins being used by the current project in JSON format
Install a plugin kind (e.g resource) with the latest version or a specific one
Remove a plugin kind (e.g. resource) and interactively pick a version or provide a specific one
Display help
SYNOPSIS
pulumi plugin <command> [<arguments>...] [<options>]
Common Commands:
pulumi plugin install <type> <name> [<version>] [--file <path> | --server <url>]
pulumi plugin ls [<options>]
pulumi plugin rm <name> [<options>]
pulumi plugin inspect <type> <name> [<version>]
PARAMETERS
install <type> <name> [<version>]
Installs a Pulumi plugin. <type> can be 'resource' or 'language', and <name> is the plugin identifier (e.g., 'aws', 'python'). An optional <version> can be specified.
--file <path>
Specifies a local file path to install the plugin from, rather than downloading from a registry.
--server <url>
Specifies a custom plugin server URL to download the plugin from.
--reinstall
Forces reinstallation of a plugin, even if it's already installed.
ls / list
Lists all currently installed Pulumi plugins, showing their type, name, and version.
rm / uninstall <name>
Removes a specified plugin by its name. Use --all to remove all plugins.
--all
Used with rm to remove all installed plugins.
inspect <type> <name> [<version>]
Inspects and displays detailed information about a specific installed plugin.
--logtostderr
Log to stderr instead of to files.
--non-interactive
Disable interactive prompts (e.g., for confirmations).
DESCRIPTION
The pulumi-plugin command is a crucial utility within the Pulumi Command Line Interface (CLI) that enables users to manage external components necessary for infrastructure provisioning: plugins. These plugins come in various types, primarily resource providers (which interact with cloud services like AWS, Azure, GCP, or Kubernetes) and language hosts (which allow Pulumi to execute code written in languages such as TypeScript, Python, Go, and C#).
The command facilitates operations like installing new plugins from official registries or specified sources, listing currently installed plugins, and removing no-longer-needed plugins. By abstracting the complexity of plugin management, pulumi-plugin ensures that developers can easily extend Pulumi's capabilities to interact with a vast array of services and write infrastructure as code in their preferred programming languages. It plays a vital role in maintaining the integrity and functionality of Pulumi environments, allowing for seamless execution of Pulumi programs across different cloud providers and programming paradigms.
CAVEATS
Using the correct plugin version is crucial; mismatches between your Pulumi program's dependency and the installed plugin can lead to errors.
Plugins downloaded from non-official sources should be used with caution, as they could pose security risks.
The pulumi plugin command requires an active internet connection for installing plugins from remote servers unless using the --file option.
PLUGIN TYPES
Pulumi primarily utilizes two main types of plugins:
Resource Providers: These plugins encapsulate the logic for interacting with cloud APIs (e.g., AWS, Azure, GCP, Kubernetes) to provision and manage resources.
Language Hosts: These plugins enable Pulumi to understand and execute infrastructure code written in various programming languages (e.g., TypeScript, Python, Go, C#, Java, YAML, F#).
AUTOMATIC VS. MANUAL PLUGIN MANAGEMENT
While pulumi plugin allows manual management, Pulumi often automatically installs required plugins when you run commands like pulumi up or pulumi refresh, based on your Pulumi.yaml and language-specific dependency files (e.g., package.json, requirements.txt). Manual management is useful for specific versions, offline scenarios, or custom plugin sources.
HISTORY
Pulumi, launched in 2018, was designed from the ground up to allow developers to use general-purpose programming languages for infrastructure as code. This core philosophy necessitated a robust plugin architecture to enable interaction with various cloud providers and support multiple programming languages. The pulumi-plugin command has been an integral part of the Pulumi CLI since its early days, continuously evolving to support new plugin types, mirror capabilities, and improve the overall developer experience in managing these essential components. Its development closely tracks the expansion of the Pulumi ecosystem and the growing number of supported providers and languages.