Visitar URL original
Actually support parameterisation for `import` by i-am-tom · Pull Request #23763 · pulumi/pulumi · GitHub
Skip to content

Actually support parameterisation for import - #23763

Merged
i-am-tom merged 3 commits into
masterfrom
tom/import-converter-parameterization
Jul 2, 2026
Merged

i-am-tom merged 3 commits into
masterfrom
tom/import-converter-parameterization

Conversation

@i-am-tom

@i-am-tom i-am-tom commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

It seems to me like the only thing missing for parameterisation support in the import flow is that nothing populates the Parameterization key. This PR does that in all the places Claude and I could find. By the looks of it, everything after this point in the plumbing already works.

Next up is to do something with this new plumbing - namely allow our newfangled hcl importer to read and write TF bridge state.

🤖 Generated with Claude Code

i-am-tom and others added 2 commits July 1, 2026 12:28
The engine's import path already supports importing a resource under a
parameterized (e.g. dynamically bridged) provider via
`deploy.Import.Parameterization`, but nothing populated it: the converter
protocol, the `plugin.ResourceImport` type, and the JSON import file all
dropped parameterization on the floor, so `pulumi import` could only ever
produce plain-provider state.

This plumbs a parameterization through every layer above the engine:

- `converter.proto`: a new `ResourceParameterization` message on
  `ResourceImport` (base plugin name, base plugin version, value).
- `plugin.ResourceImport` (both the `pkg` and `sdk` copies) plus the client
  and server mappings.
- The JSON `importSpec` / import file, so `--file` and generated import files
  can represent it too.
- The CLI's import-file-to-`deploy.Import` mapping.

With this in place a converter can emit resources that import under
parameterized providers rather than plain ones. This is the core-side enabler
for `pulumi import --from hcl` (pulumi/pulumi-hcl#167), which needs the
imported state to stay on the dynamic Terraform bridge.

Part of the high-fidelity Terraform state import epic (pulumi/home#4798).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@i-am-tom i-am-tom changed the title Plumb provider parameterization through the import converter path Actually support parameterisation for import Jul 1, 2026
pusherrf("could not parse parameterization version '%v' for %v: %w",
spec.Parameterization.PluginVersion, describeResource(i, spec), err)
} else {
imp.Parameterization = &deploy.Parameterization{

@i-am-tom i-am-tom Jul 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey whaddyaknow

@i-am-tom
i-am-tom marked this pull request as ready for review July 1, 2026 13:15
@i-am-tom
i-am-tom requested a review from a team as a code owner July 1, 2026 13:15

@iwahbe iwahbe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as you drop the changes in sdk/go/common/resource/plugin, I think we are good on the rest.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to, and shouldn't, update sdk/go/common/resource/plugin anymore unless we have a reason.


// the parameterization to use for the resource's provider, if any. Set when the resource should be
// imported under a parameterized (e.g. dynamically bridged) provider rather than a plain one.
ResourceParameterization parameterization = 9;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need "extension" support here as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll do a follow-up

The pkg/resource/plugin copy is the one that matters; sdk/go/common/resource/plugin
should no longer be updated. Reverts the parameterization additions to that copy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@i-am-tom
i-am-tom enabled auto-merge July 2, 2026 08:05
@i-am-tom
i-am-tom added this pull request to the merge queue Jul 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 2, 2026
@i-am-tom
i-am-tom added this pull request to the merge queue Jul 2, 2026
Merged via the queue into master with commit ed5becb Jul 2, 2026
122 of 123 checks passed
@i-am-tom
i-am-tom deleted the tom/import-converter-parameterization branch July 2, 2026 11:51
pull Bot pushed a commit to nagyist/pulumi that referenced this pull request Jul 2, 2026
Extension support follow-up to pulumi#23763. It looks sensible to me, but I'd
appreciate someone more familiar with the extension system taking a
look.

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@pulumi-bot

Copy link
Copy Markdown
Contributor

This PR has been shipped in release v3.251.0.

pull Bot pushed a commit to makesoftwaresafe/pulumi that referenced this pull request Jul 8, 2026
## 3.251.0 (2026-07-08)

### Features

- [programgen/pcl] Invoke functions declared with multi-argument inputs
using positional arguments in PCL
[pulumi#23571](pulumi#23571)
- [sdkgen] Generate SDKs and programs for extension-parameterized
packages [pulumi#23579](pulumi#23579)
- [engine] Add `TargetSnippets` to deployment options to target snippets
by UUID.

### Bug Fixes

- [cli/display] Prevent plugin debug logs from appearing as raw JSON in
the CLI's output when logging with `--logtostderr`
[pulumi#23633](pulumi#23633)
- [cli] Show a `retain` marker for retain-on-delete resources in
`--diff` output
- [sdk/nodejs] Don't include the version in module paths when
serializing functions when using pnpm
- [cli] Don't miscopy out archives

### Improvements

- [cli/deployment] `pulumi deployment settings` no longer writes the
local `Pulumi.<stack>.deploy.yaml` file: the experimental `init`,
`pull`, `configure`, and `env` subcommands have been removed, and the
CLI no longer calls the deployment-settings encrypt endpoint.
`get`/`edit`/`destroy` continue to manage settings directly in Pulumi
Cloud [pulumi#23480](pulumi#23480)
- [cli/import] Support importing resources under parameterized providers
from a converter or import file
[pulumi#23763](pulumi#23763)
- [cli/import] Support importing resources under extension-parameterized
providers [pulumi#23779](pulumi#23779)
- [engine] Add OpenTelemetry spans to the StackReference read path so
performance traces can pinpoint slow snapshot fetches, deserialization,
or secret decryption
- [cli/deployment] The deployment settings file
(`Pulumi.<stack>.deploy.yaml`) has been removed entirely. The
experimental `pulumi deployment settings push` (`update`/`up`) command,
the `--config-file` flag, and the SDK helpers that read the file have
been removed. Manage deployment settings directly in Pulumi Cloud with
`pulumi deployment settings get`, `edit`, and `destroy`
[pulumi#23480](pulumi#23480)
- [cli/env] Report the new revision number when an environment
definition is updated (e.g. `pulumi env edit`, `pulumi env provider`,
`pulumi env version rollback`)
[pulumi#23799](pulumi#23799)
- [cli/convert] Add an `ecosystem` field to converter mapping requests
so a converter can request mappings for the ecosystem it consumes rather
than its own name [pulumi#23804](pulumi#23804)

### Miscellaneous

- [cli] Add `pulumi neo --debug-update` and `pulumi neo --debug-preview`
flags to investigate a failed update or preview, suggested in the
failure output [pulumi#23499](pulumi#23499)
- [cli/env] Fold the Pulumi ESC engine and CLI into the pulumi/pulumi
monorepo, removing the sdk↔esc Go module cycle. Internal refactor with
no user-facing behavior change; `pulumi env`/`pulumi esc` are
unaffected. [pulumi#23746](pulumi#23746)
i-am-tom added a commit to pulumi/pulumi-hcl that referenced this pull request Jul 9, 2026
pulumi/pulumi#23763 (review)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants