{"record":{"id":"df7db4bcaf829d43","repo":"pulumi/pulumi","slug":"failed-to-validate-explicit-provider-config-for-s","errorCode":null,"errorMessage":"failed to validate explicit provider config for %s: %w","messagePattern":"failed to validate explicit provider config for (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resource/deploy/import.go","lineNumber":545,"sourceCode":"\t\t\tproviders.SetProviderVersion(inputs, version)\n\t\t}\n\t\tif imp.PluginDownloadURL != \"\" {\n\t\t\tproviders.SetProviderURL(inputs, imp.PluginDownloadURL)\n\t\t}\n\t\tif len(imp.PluginChecksums) > 0 {\n\t\t\tproviders.SetProviderChecksums(inputs, imp.PluginChecksums)\n\t\t}\n\t\tif parameterization != nil {\n\t\t\tproviders.SetProviderName(inputs, pkg)\n\t\t\tproviders.SetProviderParameterization(inputs, parameterization)\n\t\t}\n\n\t\tresp, err := i.deployment.providers.Check(ctx, plugin.CheckRequest{\n\t\t\tURN:  providerURN,\n\t\t\tNews: inputs,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"failed to validate explicit provider config for %s: %w\", providerURN, err)\n\t\t}\n\t\tstate := pkgresource.NewState{\n\t\t\tType:                    typ,\n\t\t\tURN:                     providerURN,\n\t\t\tCustom:                  true,\n\t\t\tDelete:                  false,\n\t\t\tID:                      \"\",\n\t\t\tInputs:                  inputs,\n\t\t\tOutputs:                 nil,\n\t\t\tParent:                  imp.Parent,\n\t\t\tProtect:                 false,\n\t\t\tTaint:                   false,\n\t\t\tExternal:                false,\n\t\t\tDependencies:            nil,\n\t\t\tInitErrors:              nil,\n\t\t\tProvider:                \"\",\n\t\t\tPropertyDependencies:    nil,\n\t\t\tPendingReplacement:      false,","sourceCodeStart":527,"sourceCodeEnd":563,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/resource/deploy/import.go#L527-L563","documentation":"During a `pulumi import`, when the imported resource is an explicit provider, the engine calls the provider plugin's Check RPC to validate its configuration inputs. If the plugin returns an error (not validation failures, but a hard RPC/protocol error), the engine wraps it with this message and aborts the import. It means the provider's configuration could not even be evaluated for validity.","triggerScenarios":"Running `pulumi import` with `--provider` referencing an explicit provider whose inputs fail the provider's Check call — e.g. the plugin crashes, returns a gRPC error, or its inputs are structurally invalid so Check errors instead of returning failures.","commonSituations":"Malformed provider config on the import command line, a provider plugin binary that is broken or incompatible with the engine, or provider inputs that fail deserialization in the plugin.","solutions":["Read the wrapped underlying error (%w) for the plugin's actual message and fix the provider inputs passed via --provider.","Upgrade or reinstall the provider plugin so its Check RPC works with your engine version.","Verify the provider reference string (urn:id) passed with --provider is correctly formed.","Retry the import after correcting config; check plugin logs for the underlying cause."],"exampleFix":"// before: provider inputs invalid\npulumi import --provider 'urn:pulumi:stack::proj::pulumi:providers:aws::default::04da6b54...' aws:iam/role:Role myRole r-123\n// after: correct provider config inputs\npulumi import --provider 'urn:pulumi:stack::proj::pulumi:providers:aws::default::<valid-id>,region=us-east-1' aws:iam/role:Role myRole r-123","handlingStrategy":"try-catch","validationCode":"// Pre-validate provider inputs via a stack preview before importing\nconst provider = new aws.Provider(\"default\", { region: \"us-east-1\" });\n// verify: pulumi preview succeeds and plugin version matches CLI","typeGuard":null,"tryCatchPattern":"try {\n  await pulumiImport(resourceArgs, { provider: providerRef });\n} catch (e) {\n  if (String(e).includes(\"failed to validate explicit provider config\")) {\n    // inspect wrapped cause, fix provider inputs / plugin, retry\n  }\n  throw e;\n}","preventionTips":["Keep provider plugins up to date and compatible with your CLI version","Validate provider config with a preview before running import","Pass all required provider inputs explicitly with --provider"],"tags":["import","provider","grpc","validation"],"backgroundTag":"provider-config-check-failed","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}