{"record":{"id":"307e88600f9ccdcf","repo":"pulumi/pulumi","slug":"an-inline-resource-must-be-specified-if-no-convert-307e88","errorCode":null,"errorMessage":"an inline resource must be specified if no converter or import file is used, missing id","messagePattern":"an inline resource must be specified if no converter or import file is used, missing id","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/operations/import.go","lineNumber":1031,"sourceCode":"\n\t\t\t\tf, err := makeImportFileFromResourceList(ctx, resp.Resources)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\timportFile = f\n\t\t\t} else {\n\t\t\t\tmsg := \"an inline resource must be specified if no converter or import file is used, missing \"\n\t\t\t\tif len(args) == 0 {\n\t\t\t\t\tcontract.IgnoreError(cmd.Help())\n\t\t\t\t\treturn errors.New(msg + \"type, name, and id\")\n\t\t\t\t}\n\t\t\t\tif len(args) == 1 {\n\t\t\t\t\tcontract.IgnoreError(cmd.Help())\n\t\t\t\t\treturn errors.New(msg + \"name and id\")\n\t\t\t\t}\n\t\t\t\tif len(args) == 2 {\n\t\t\t\t\tcontract.IgnoreError(cmd.Help())\n\t\t\t\t\treturn errors.New(msg + \"id\")\n\t\t\t\t}\n\t\t\t\tif len(args) > 3 {\n\t\t\t\t\tcontract.IgnoreError(cmd.Help())\n\t\t\t\t\treturn errors.New(\"only expected at most three arguments\")\n\t\t\t\t}\n\t\t\t\tf, err := makeImportFile(args[0], args[1], args[2], properties, parentSpec, providerSpec, \"\")\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t\timportFile = f\n\t\t\t}\n\n\t\t\tif !generateCode && outputFilePath != \"\" {\n\t\t\t\tfmt.Fprintln(cmd.ErrOrStderr(), \"Output file will not be used as --generate-code is false.\")\n\t\t\t}\n\n\t\t\tvar outputResult bytes.Buffer\n\t\t\toutput := io.Writer(&outputResult)","sourceCodeStart":1013,"sourceCodeEnd":1049,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/operations/import.go#L1013-L1049","documentation":"The `pulumi import` command, when run without a --converter or --file, requires the resource to be specified inline as positional arguments: <type> <name> <id>. This error is thrown when exactly two arguments were supplied, meaning the resource ID is missing. The command prints help output alongside the error so the user can see the expected usage.","triggerScenarios":"Running `pulumi import <type> <name>` with only two positional arguments and no --file or --converter flag (e.g. `pulumi import aws:s3/bucket:Bucket my-bucket`).","commonSituations":"Users forget the cloud-provider resource ID (which is often a long opaque identifier like an ARN or a UUID) or confuse the import syntax with `pulumi resource` commands; also common when copy-pasting examples that used --file.","solutions":["Add the resource ID as the third positional argument: `pulumi import <type> <name> <id>` (e.g. the AWS bucket name, Azure resource ID, or GCP self-link).","If the resource list is large, use an import definition file instead: `pulumi import --file import.json`.","Run `pulumi import --help` to review the expected argument order: type, name, id."],"exampleFix":"// before\npulumi import aws:s3/bucket:Bucket my-bucket\n// after\npulumi import aws:s3/bucket:Bucket my-bucket my-bucket-abc123","handlingStrategy":"validation","validationCode":"if [ \"$#\" -lt 3 ]; then echo \"usage: pulumi import <type> <name> <id>\"; exit 1; fi\npulumi import \"$@\"","typeGuard":null,"tryCatchPattern":"if ! pulumi import \"$type\" \"$name\" \"$id\" 2>err.log; then grep 'missing id' err.log && echo 'Supply the provider resource ID as the third argument.'; fi","preventionTips":["Always pass the cloud resource ID as the third positional argument when not using --file.","Use --file for anything beyond a single simple resource.","Check `pulumi import --help` for the expected argument order before scripting."],"tags":["cli","pulumi-import","missing-argument"],"backgroundTag":"missing-cli-argument","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-08-31T14:17:45.589Z"}