Import files can declare and reference explicit providers
Introduced 2026-07-23 · score 0.96
HOW TO USE IT
When importing resources that need an explicit provider, declare the provider in `resources` and reference its name from each imported resource’s `provider` field. Run `pulumi import --file <path>` to import the JSON file.
pulumi import --file <path-to-import.json>{
"resources": [
{ "type": "pulumi:providers:aws", "name": "my-prov" },
{ "type": "aws:s3/bucket:Bucket", "name": "thing", "id": "<resource-id>", "provider": "my-prov" }
],
"providerInputs": { "my-prov": { "region": "eu-west-1" } }
}WHY THIS HELPS
Import resources with explicit providers from an import file.
REQUIREMENTS AND LIMITATIONS
- Version: 3.254.0
- resources (required): List of resources to import.
- resources[].provider: Name of the provider resource; the docs say the referenced name must be in `nameTable`.
- providerInputs: Release-note example maps a provider name to its inputs; official import schema documentation does not document this key or its sub-keys.
- --file (required): Path to the JSON-encoded file containing resources to import.
- Prerequisite: Use a Pulumi stack and have the provider configured so it can locate the target resource.
- Docs conflict: The current CLI reference is generated for Pulumi CLI v3.268.0, newer than the card’s v3.254.0. Its import-file schema does not document `providerInputs`; the release-note example is retained as the evidence for that key.
FIRST-PARTY EVIDENCE
- https://github.com/pulumi/pulumi/releases/tag/v3.254.0
- https://github.com/pulumi/pulumi/pull/23972
- https://www.pulumi.com/docs/iac/cli/commands/pulumi_import/
- https://www.pulumi.com/docs/iac/guides/migration/import/
Check the installed version and the source before using it. Entry JSON