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
1. Generates a local SDK in the language of your Pulumi program
56
+
1. Automatically adds the package to your `Pulumi.yaml` file under the `packages` key
57
+
53
58
{{% notes type="tip" %}}
54
59
In order to make sure Pulumi users are aware of the Any Terraform Provider's capabilities, Pulumi has included select, popular providers that can be consumed in Pulumi via the Any Terraform Provider in the Pulumi Registry, such as [The Honeycomb provider](/registry/packages/honeycombio/).
55
60
{{% /notes %}}
56
61
57
62
The generated SDK will include a `.gitignore` so it can be safely committed to version control without including all of the SDK's dependencies. The SDK installation process also downloads the provider binary to a shared location on your local system outside of the working directory. The binary is cached, so it will not need to be downloaded more than once, and is not committed to version control.
58
63
59
-
#### Adding Provider Packages to the Project Configuration File
64
+
#### About Provider Packages in the Project Configuration File
60
65
61
66
{{% notes type="info" %}}
62
-
Adding provider packages to your project configuration file requires Pulumi version 3.157.0 or later.
67
+
When using `pulumi package add` with Pulumi version 3.157.0 or later, packages are automatically added to your project configuration file (`Pulumi.yaml`).
63
68
{{% /notes %}}
64
69
65
-
You can avoid the need to commit any generated SDK files to version control by adding your parameterized packages to your Pulumi project configuration file (`Pulumi.yaml`).
66
-
67
-
You can add a list of your named provider packages under the [`packages`](/docs/iac/concepts/projects/project-file/#packages-options) key. For the example in the previous section, the syntax would be:
70
+
When you run `pulumi package add`, the package is automatically added to your Pulumi project configuration file under the [`packages`](/docs/iac/concepts/projects/project-file/#packages-options) key. For the example in the previous section, the following entry would be added to your `Pulumi.yaml`:
68
71
69
72
```yaml
70
73
packages:
71
74
random:
72
75
source: terraform-provider
73
-
version: 0.10.0 # The version of terraform-provider in the Pulumi registry
76
+
# The version of terraform-provider in the Pulumi registry.
77
+
# This is automatically added by the `pulumi package add` command:
78
+
version: 0.10.0
74
79
parameters:
75
80
- hashicorp/random
76
-
- 3.7.1 # The version of hashicorp/random in the OpenTofu Registry
81
+
# The version of hashicorp/random in the OpenTofu Registry.
82
+
# This is not a required parameter, but you may wish to include
83
+
# it at the command line or add it after the fact in Pulumi.yaml
84
+
# in order to ensure consistent builds. If this value is not
85
+
# specified, the provider will take the latest version of
86
+
# the OpenTofu provider.
87
+
- 3.7.1
77
88
```
78
89
79
-
The versions specified above are optional, but recommended in order to ensure consistent behavior on all systems.
80
-
81
90
You can install any packages tracked in the project configuration file with the [`pulumi install`](/docs/iac/cli/commands/pulumi_install/) command:
82
91
83
92
```bash
@@ -88,7 +97,7 @@ Installing package 'random'...
88
97
```
89
98
90
99
{{% notes type="warning" %}}
91
-
If you are tracking a package in the project file and installing via `pulumi install`, be sure to remove any generated SDK files from version control and `.gitignore` the SDK directory or the generated files will still be under version control!
100
+
If you are using `pulumi install` to install packages defined in your project file, be sure to remove any generated SDK files from version control and `.gitignore` the SDK directory or the generated files will still be under version control!
0 commit comments