Skip to content

Commit 3077232

Browse files
committed
[registry] Split the blog into #20648; make local conversion a fallback, not a wait-saver
1 parent ca8204d commit 3077232

5 files changed

Lines changed: 6 additions & 103 deletions

File tree

-171 KB
Binary file not shown.

content/blog/terraform-modules-pulumi-cloud-registry/index.md

Lines changed: 0 additions & 97 deletions
This file was deleted.
-268 KB
Binary file not shown.

content/docs/iac/guides/building-extending/using-existing-tools/use-terraform-module.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,13 @@ pulumi package add <name>-<system> [<version>]
9494

9595
A module published as `acme-corp/vpc/aws` installs as `vpc-aws`. This is the same as any other Pulumi package: you get a generated SDK in your language, an [API reference](/docs/idp/concepts/private-registry/#api-documentation) on the package's page, and [usage tracking](/docs/idp/concepts/private-registry/#usage-tracking) showing which of your stacks depend on it and which are behind the latest version. Installing a converted package requires Pulumi CLI 3.248.0 or newer; see [Download & Install Pulumi](/docs/install/) to upgrade.
9696

97-
The package's page in Pulumi Cloud shows whether a given version has converted. The same conversion can also be run locally, against the module address rather than the package name:
97+
The package's page in Pulumi Cloud shows whether a given version has converted. If a version you need has no package, the same conversion can also be run on your own machine, against the module address rather than the package name:
9898

9999
```bash
100100
pulumi package add hcl module tf.pulumi.com/<namespace>/<name>/<system> [<version>]
101101
```
102102

103-
This runs the conversion at the moment you run it, using whatever version of the `hcl` provider you have, rather than using the package the registry produced. Use it while a version is still converting. A module the registry could not convert fails here for the same reason. The version is optional; omit it to resolve the latest published version. Self-hosted Pulumi Cloud installations use their own host (`<your-pulumi-host>/<namespace>/<name>/<system>`).
103+
This converts the module as you run it, using your local `hcl` provider, rather than installing the package the registry produced, so a module the registry could not convert may well fail here for the same reason. The version is optional; omit it to resolve the latest published version. Self-hosted Pulumi Cloud installations use their own host (`<your-pulumi-host>/<namespace>/<name>/<system>`).
104104

105105
See [Terraform Modules in the Pulumi Cloud Registry](/docs/idp/concepts/terraform-modules/) for the publishing side and the broader module workflow.
106106

content/docs/idp/concepts/terraform-modules.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Pulumi Cloud uses the same `<namespace>/<name>/<system>` address form as HCP Ter
8888

8989
Publishing a module version also converts it into a Pulumi package, with no extra step on your part. The package is named after the module: `<name>-<system>`, published under the same namespace and registry source, so a module published as `acme-corp/vpc/aws` produces a package called `vpc-aws`.
9090

91-
Conversion runs per version, so a module can have some versions with packages and some without. The package's page in Pulumi Cloud shows which versions have converted and gives you the command to install one. While a version is still converting, you can [run the same conversion locally](#converting-a-module-locally) instead of waiting.
91+
Conversion runs per version, so a module can have some versions with packages and some without. The package's page in Pulumi Cloud shows which versions have converted and gives you the command to install one.
9292

9393
## Consume from a Pulumi program
9494

@@ -108,17 +108,17 @@ Usage tracking only counts consumption through the converted package. A stack or
108108
Installing a converted package requires Pulumi CLI 3.248.0 or newer. See [Download & Install Pulumi](/docs/install/) to install or upgrade.
109109
{{% /notes %}}
110110

111-
### Converting a module locally
111+
### If a version has no package
112112

113-
The same conversion can be run locally, against the module address rather than the package name:
113+
Installing by package name is the path to reach for. If a version you need has not produced a package, the same conversion can also be run on your own machine, against the module address rather than the package name:
114114

115115
```bash
116116
pulumi package add hcl module tf.pulumi.com/<namespace>/<name>/<system> [<version>]
117117
```
118118

119119
`hcl` is a parameterized provider. The `module` keyword selects module mode, followed by the module address and an optional version. Omit the version to resolve the latest published version; pass one to pin it.
120120

121-
This runs the conversion at the moment you run it, using whatever version of the `hcl` provider you have, rather than using the package the registry produced. Use it while a version is still converting. It does not work around a failed conversion: a module the registry could not convert fails here for the same reason.
121+
This converts the module as you run it, using your local `hcl` provider, rather than installing the package the registry produced. It is worth trying when a version has no package, though a module the registry could not convert may well fail here for the same reason.
122122

123123
Both commands resolve using your Pulumi credentials. See [Use a Terraform Module in Pulumi](/docs/iac/guides/building-extending/using-existing-tools/use-terraform-module/) for examples.
124124

0 commit comments

Comments
 (0)