[docs] Document Terraform modules in the Pulumi Cloud registry - #19453
Conversation
|
Your site preview for commit ca8204d is ready! 🎉 http://www-testing-pulumi-docs-origin-pr-19453-ca8204d4.s3-website.us-west-2.amazonaws.com Changed pages: |
Social Media ReviewNo blog post social copy required review in this run — Note: the check did surface a build warning unrelated to copy content — the social card image for Updated for commit |
…stry Add a new concept page under IDP describing how Pulumi Cloud hosts Terraform modules: authentication via `terraform login`, the three HCP-compatible publish paths (go-tfe, hashicorp/tfe provider, tfc-workflows-github Action), the standard module layout we extract from at publish, consumption from OpenTofu / Terraform via the Module Registry Protocol, and consumption from a Pulumi program via `pulumi package add terraform-module`. Cross-link from the existing "Use a Terraform Module in Pulumi" guide so consumers landing on the IaC guide can discover the Pulumi-Cloud-hosted path. Design doc: https://app.notion.com/p/Terraform-module-hosting-in-the-Pulumi-Cloud-registry-372fdbdf1cce801ea7a3f4946c1e4154 Fixes pulumi/pulumi-service#44080 ## Test plan - Render the IDP concepts section locally and confirm the new "Terraform Modules" entry appears under the Concepts menu - Click through every internal link in the new page to confirm targets exist
Add the announcement blog post for hosting Terraform modules in the Pulumi Cloud registry, and correct the registry host across the docs and blog from app.pulumi.com to the canonical tf.pulumi.com (per pulumi/pulumi-service#44889; app.pulumi.com is the console only). Move the migration guidance out of the blog and into the concept page, and document the one naming rule that differs from HCP Terraform: module names reject underscores.
The TFE discovery document (cmd/service/api/tfe_discover.go) advertises tfe.v2, state.v2, and modules.v1 but no login.v1, so terraform login against tf.pulumi.com is unsupported. Document the real auth instead: a Pulumi access token is the bearer for publish (go-tfe, the tfe provider, the GitHub Action), pulumi login for pulumi package add, and TF_TOKEN_tf_pulumi_com for plain OpenTofu or Terraform.
- Remove the tfc-workflows-github Action from the publish and delete paths and from the auth list. create-run triggers a run; it does not touch the module registry. The testbed only exercised go-tfe and the tfe provider. - Consume from Pulumi: drop the rejected "CLI injects TF_TOKEN_<host>" detail. After pulumi login the provider resolves the module with your Pulumi credentials. Note that terraform-module is a parameterized provider and name its parameters. - Module layout: parse all root .tf files (any filenames); examples and README are captured at publish, not rendered (console rendering is not built yet). - Say packages, not components.
…ckend Apply the Pulumi brand writing-style rules: sentence case for the concept page title_tag/title/h1 and no over-capitalized concepts, so "Terraform modules in the Pulumi Cloud registry" rather than title case. Drop the "just" minimizer from the migration line. Link "keep Terraform state in Pulumi Cloud" in the blog to the state backend guide.
The Pulumi-program consume path now uses the forthcoming hcl package: pulumi package add hcl module <source> [version], with the version optional (omit for latest, pass to pin). Drops the terraform-module alias parameter, since the hcl module form derives the package name from the module.
bbd2a42 to
34dbab8
Compare
34dbab8 to
3722c8c
Compare
…and console URLs Local conversion runs the same `hcl` provider the registry runs, so a module the registry could not convert fails locally for the same reason. All three pages offered it as the answer for a module using Terraform features Pulumi cannot express, which it is not. It is now described as what it is: the same conversion, run at the moment you run it, useful while a version is still converting. The concept page's section is renamed to match and says outright that it is not a way around a failed conversion. The CLI version requirement links to Download & Install Pulumi on all three pages, so a reader on an older CLI has somewhere to go. The concept page picks up aliases for the two docs URLs the console links to, both of which 404 today: - `/docs/terraform-modules/`, from the package install card - `/docs/iac/using-pulumi/pulumi-cloud/registry/terraform-modules/`, from the Terraform modules list page The concept page's deletion section is removed while we decide what deleting a converted package should do to the module it came from (pulumi/pulumi-service#47170). Documenting module deletion now would describe behavior we expect to change. The post is dated 2026-08-04.
5685d71 to
7d7ea99
Compare
Pre-merge Review — Last updated 2026-07-31T14:13:01ZTip Summary: This PR launches Terraform-module support in the Pulumi Cloud registry with three pieces: a new IDP concept page ( Review confidence:
Investigation log
🔍 Verification trail103 claims extracted · 67 verified · 23 unverifiable · 10 contradicted
Important Please don't hide, resolve, or delete this comment! It breaks things! 📖 How pre-merge review works — the full lifecycle, short-circuits, and escape hatches. |
continued from previous comment
📊 Editorial balanceSingle-subject post; balance check N/A. 🚨 Outstanding in this PRThese must be resolved or refuted before merging.
|
`make lint` gates the build and was failing: - The post was missing the required `category` front matter. It announces a shipped feature, so `product` - Its `meta_desc` was 182 characters against a 160 limit. Dropped the usage tracking clause, which the post covers in the body - Removing the concept page's deletion section left a trailing blank line From the pre-merge review: - The multi-language component link 404s. `pulumi-hcl` has no `main` branch; `https://github.com/pulumi/pulumi-hcl/blob/master/docs/mlc.md` resolves. Fixed in the post and the concept page - The access token link went through an alias. The page's canonical route is `/docs/administration/access-identity/access-tokens/`; the old path is line 19 of that page's own aliases list - The closing line of "Converting a module locally" restated what the Authenticate section already establishes - Style: two `It is` openings and one `mostly` - The guide's new heading was Title Case, against AGENTS.md's sentence case rule for H2 and below The module name rule is now stated as the regex the service enforces, `[a-z0-9][a-z0-9-]*` (`pkg/apitype/registry_artifact.go`), rather than a character list that implied a leading hyphen was valid. Two review findings are not acted on. The registry host is `tf.pulumi.com`: `tfe.pulumi.com` is a dead record that CloudFront-403s since the distribution alias, ALB host rule, and service dispatch moved, so the provider test the review cites is stale. And `canonical_url` pointing at the concept page is what BLOGGING.md prescribes for a feature announcement documented in the docs.
7f424a2 to
d594684
Compare
|
@fnune Can you break out the blog into a separate PR so we can merge the docs independently? Then we can publish the post on or about launch day. |
cnunciato
left a comment
There was a problem hiding this comment.
Nice! Bunch of things for you to consider. Main thing is that I'd like to have us publish the blog separately, but I also a bunch of questions and suggestions for you to consider. Ping me when you're ready for a second look!
|
|
||
| ## What happens when you publish | ||
|
|
||
| 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`. |
There was a problem hiding this comment.
Just calling out that we may need to revise this depending on actual behavior.
| pulumi package add hcl module tf.pulumi.com/<namespace>/<name>/<system> [<version>] | ||
| ``` | ||
|
|
||
| `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. |
There was a problem hiding this comment.
hclis a parameterized provider. Themodulekeyword selects module mode,
This seems like an implementation detail, so irrelvant to the user. Suggest deleting unless they need to know this for some reason.
There was a problem hiding this comment.
pulumi package add <...args> is public Pulumi CLI syntax, and it may be new to the user, because it's a parameterized package. It's public API, not an implementation detail IMO.
Thoughts @iwahbe?
The registry-hosting half of the Terraform Modules feature is documented in #19453, which adds content/docs/idp/concepts/terraform-modules.md. Link the four places this page mentions hosting modules in Pulumi Cloud at that page, and keep the module-consumption links pointed at the get-started guide, which covers a different capability. Also picks up the HCP-compatibility detail from that page, which lands well on a Terraform Cloud comparison specifically: the publish API is wire-compatible with HCP Terraform's private registry, so existing go-tfe and hashicorp/tfe pipelines migrate by repointing the host at tf.pulumi.com. Depends on #19453 — /docs/idp/concepts/terraform-modules/ 404s until it merges. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This page already covered Pulumi Cloud as a Terraform state backend, but it never mentioned Pulumi HCL, and one "Choose Terraform when" bullet was directly counter to the new positioning: "Have a large existing investment in HCL, modules, and team expertise that you don't want to migrate." That is precisely the case the launch addresses. - Intro: Pulumi "lets you pick the language," HCL included, plus a paragraph establishing interoperability rather than strict alternative. - Language support and Modularity table rows now cover Pulumi HCL, direct Terraform module consumption, and registry hosting. - "Language support and the authoring experience": add a paragraph making the point that the language is a per-project decision on Pulumi, not a wall. - "Choose Terraform when": drop the stale HCL-investment bullet, replace with end-to-end HashiCorp standardization, and state plainly that an existing HCL and module investment is no longer a reason on its own. - Adoption list: expand the state backend entry with remote runs and approval gates, and add HCL projects and registry hosting as paths. - FAQ: add "Can I write Pulumi programs in HCL?" and expand the existing state backend answer. Verified all ten questions still emit in the FAQPage schema. - Next steps: add the state backend, HCL, and HCP Terraform comparison. Terraform module consumption links are left pointing at the guide, which is where this page already pointed and which #19453 maintains. Depends on #19453 for /docs/idp/concepts/terraform-modules/. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The new interop capabilities land harder on this page than any other, and none of them were here. Pulumi HCL is fully OpenTofu compatible and resolves unqualified provider sources against the OpenTofu registry, exactly as tofu does. Pulumi Cloud is a managed state backend and remote runner for the tofu CLI. Both were absent. Two claims were also stale in a way that sent readers elsewhere: - "Local CLI; remote execution requires a third-party runner" and the Commercial option row, which listed only Spacelift, env0, and Scalr as sources of managed state and collaboration for OpenTofu users. - "Choose OpenTofu when you have a large existing investment in HCL configurations, modules, and team expertise that you don't want to migrate." Changes: - Intro and "What is Pulumi?": establish interoperability, with the OpenTofu registry provider-resolution detail. - Table: Language support, State management, Execution model, Modularity, and Commercial option rows now account for Pulumi HCL, the state backend, and module hosting. - "Language support" and "Execution and rollbacks": add the HCL-is-a-choice paragraph and correct the remote-execution claim. - "Choose OpenTofu when": replace the stale HCL-investment bullet with MPL 2.0 engine licensing and community governance, which is the real reason a team picks OpenTofu, and state plainly that an HCL investment no longer decides it. - Adoption: add the state backend (with tofu init -migrate-state) and HCL. - FAQ: add HCL and OpenTofu-state-in-Pulumi-Cloud questions. All ten still emit in the FAQPage schema. Depends on #19453 for /docs/idp/concepts/terraform-modules/. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Docs for hosting Terraform modules in the Pulumi Cloud registry, and for the Pulumi package every published version converts into.
docs/idp/concepts/terraform-modules.md, new): authenticating with a Pulumi access token, publishing via go-tfe or thehashicorp/tfeprovider, the module layout read at publish, migrating from HCP Terraform, what publishing produces, and consuming from a Pulumi program or from OpenTofu / Terraform.pulumi package add <name>-<system>is the documented path for a Pulumi program on both pages.pulumi package add hcl module <address>is the fallback for a version that has no package. Usage tracking follows the package, so a consumer reaching the module over the Terraform protocol reports no dependency; both pages say so.The launch blog post was split out into #20648, which depends on this PR for its links and
canonical_url.Notes:
tf.pulumi.com(per pulumi/pulumi-service#44889), notapp.pulumi.com, which is the console only.Design doc: https://app.notion.com/p/Terraform-module-hosting-in-the-Pulumi-Cloud-registry-372fdbdf1cce801ea7a3f4946c1e4154
Fixes https://github.com/pulumi/pulumi-service/issues/44080
Fixes #20555
Test plan
./scripts/format.sh,node scripts/lint/lint-markdown.js, andvale --config=.vale.ini: 0 errorsmake serve, confirm the "Terraform Modules" entry renders under IDP Concepts