You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clarify package installation and move packages page to concepts (#16702)
Moved the packages concepts page from guides to concepts directory to match its nav location. Updated package consumption documentation to emphasize pulumi install as the recommended approach for installing all dependencies, including both standard package manager dependencies and local packages. Added best practices to Terraform provider and module docs.
Fixes#16699
Update package installation guidance to recommend pulumi install
Rewrote the consuming packages section to emphasize pulumi install as the recommended approach for installing dependencies. Added clear guidance on when to use standard package managers versus pulumi package add, and updated related docs to mention pulumi install in best practices.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <[email protected]>
Pulumi Packages are the core technology that enables Pulumi [resources](/docs/iac/concepts/resources/), [components](/docs/iac/concepts/components/), and [functions](/docs/iac/concepts/functions/) to be defined once and used in all Pulumi languages.
@@ -30,10 +31,34 @@ Pulumi packages consist of two parts that allow them to be consumed in any Pulum
30
31
31
32
## Consuming packages
32
33
33
-
How you consume a Pulumi package depends on whether it has published SDKs:
34
+
There are two ways to add Pulumi packages to your program:
34
35
35
-
- For packages with published SDKs, you can consume the package by adding a reference to the published SDK from the package feed, e.g. `npm install`, `dotnet package add`, etc. The published SDKs contain commands to automatically download the provider code/binary.
36
-
- For packages without published SDKs, called [local packages](/docs/iac/guides/building-extending/packages/local-packages/#updating-local-packages), you can consume a package via the [`pulumi package add`](/docs/iac/cli/commands/pulumi_package_add/) command, which will download the provider plugin and generate a local SDK. Generated local SDKs may be committed to version control, or they can be regenerated at any time with the [`pulumi install`](/docs/iac/cli/commands/pulumi_install/) command.
36
+
-**Packages with published SDKs**: Use your language's standard package manager. Most packages in the [Pulumi Registry](/registry/) have published SDKs. Each package's Installation & Configuration page shows the specific command for your language ([example](/registry/packages/aws/installation-configuration/)).
37
+
-**Local packages**: Use [`pulumi package add`](/docs/iac/cli/commands/pulumi_package_add/), which generates an SDK locally and adds a reference to `Pulumi.yaml`. This is used for components, Terraform providers, and other packages without published SDKs.
38
+
39
+
### Installing packages
40
+
41
+
To install all dependencies, use [`pulumi install`](/docs/iac/cli/commands/pulumi_install/). This is the recommended approach because it handles both standard package manager dependencies (from `package.json`, `requirements.txt`, etc.) and any local packages defined in `Pulumi.yaml` in a single command.
42
+
43
+
Run `pulumi install` when:
44
+
45
+
- Setting up a project after cloning from source control
46
+
- Adding or updating packages
47
+
- Ensuring all team members have the same dependencies
48
+
49
+
### Adding local packages
50
+
51
+
For packages without published SDKs, called [local packages](/docs/iac/guides/building-extending/packages/local-packages/), use the [`pulumi package add`](/docs/iac/cli/commands/pulumi_package_add/) command. This downloads the provider plugin, generates a local SDK in your language, and adds the package to your `Pulumi.yaml`:
After adding a local package, run `pulumi install` to complete the installation.
37
62
38
63
Some common use cases for local packages include:
39
64
@@ -45,7 +70,7 @@ In order to consume a Pulumi package, there may be additional runtime requiremen
45
70
46
71
- TypeScript packages require the NodeJS runtime.
47
72
- Python packages require a Python interpreter.
48
-
- Go packages do not require a runtime if they are compiled. If they are referenced via source (e.g. a Pulumi component published via Pulumi IDP), they require a compatible version the Go language to be installed.
73
+
- Go packages do not require a runtime if they are compiled. If they are referenced via source (e.g. a Pulumi component published via Pulumi IDP), they require a compatible version of the Go language to be installed.
49
74
- .NET packages do not require a runtime if they are compiled as runtime-included binaries, which is Pulumi's recommended approach. .NET packages compiled as runtime-dependent binaries require a runtime.
50
75
- Java packages require a JVM runtime.
51
76
- YAML packages do not have any specific runtime requirements.
Copy file name to clipboardExpand all lines: content/docs/iac/get-started/terraform/terraform-modules.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -921,6 +921,7 @@ output "website_url" {
921
921
4.**Monitor module updates**: Keep track of module updates and breaking changes
922
922
5.**Use reputable sources**: Prefer well-maintained modules from trusted sources
923
923
6.**Document module usage**: Document why you chose specific modules and their configuration
924
+
7.**Use `pulumi install` for setup**: When cloning a project that uses Terraform modules, run [`pulumi install`](/docs/iac/cli/commands/pulumi_install/) to install all dependencies, including local packages defined in `Pulumi.yaml`
Copy file name to clipboardExpand all lines: content/docs/iac/get-started/terraform/terraform-providers.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -404,5 +404,6 @@ output "availability_zones" {
404
404
1.**Use native providers when available**: Prefer native Pulumi providers over Terraform providers for better performance and type safety
405
405
2.**Document provider usage**: Document which Terraform providers your team uses and why
406
406
3.**Monitor provider updates**: Keep track of provider updates and breaking changes
407
+
4.**Use `pulumi install` for setup**: When cloning a project that uses Terraform providers, run [`pulumi install`](/docs/iac/cli/commands/pulumi_install/) to install all dependencies, including local packages defined in `Pulumi.yaml`
For packages from Git repositories, specify a version tag or commit hash to control which version is used.
175
175
176
-
After regenerating the SDK, ensure you reinstall or relink the SDK in your project using your language's package manager (e.g., `npm add`, `pip install -e`, etc.).
176
+
After regenerating the SDK, run [`pulumi install`](/docs/iac/cli/commands/pulumi_install/) to install all dependencies, including the updated local package.
0 commit comments