{"record":{"id":"468bcfd42cdf6dea","repo":"hashicorp/packer","slug":"unknown-builder-type-s-v","errorCode":null,"errorMessage":"unknown builder type(s): %v\n","messagePattern":"unknown builder type\\(s\\): (.+?)\n","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"command/hcl2_upgrade.go","lineNumber":1273,"sourceCode":"\t\tbody := sourcesContent.Body()\n\t\tbody.AppendNewline()\n\t\tif !p.BuilderPlugins.Has(builderCfg.Type) && knownPluginComponent(builderCfg.Type) == unknownPluginName {\n\t\t\tunknownBuilders = append(unknownBuilders, builderCfg.Type)\n\t\t}\n\t\tif builderCfg.Name == \"\" || builderCfg.Name == builderCfg.Type {\n\t\t\tbuilderCfg.Name = fmt.Sprintf(\"autogenerated_%d\", i+1)\n\t\t}\n\t\tbuilderCfg.Name = strings.ReplaceAll(strings.TrimSpace(builderCfg.Name), \" \", \"_\")\n\n\t\tsourceBody := body.AppendNewBlock(\"source\", []string{builderCfg.Type, builderCfg.Name}).Body()\n\n\t\tjsonBodyToHCL2Body(sourceBody, builderCfg.Config)\n\n\t\tp.out = append(p.out, transposeTemplatingCalls(sourcesContent.Bytes())...)\n\t}\n\t// TODO update to output to stderr as opposed to having the command exit 1\n\tif len(unknownBuilders) > 0 {\n\t\treturn fmt.Errorf(\"unknown builder type(s): %v\\n\", unknownBuilders)\n\t}\n\n\treturn nil\n}\n\nfunc (p *SourceParser) Write(out *bytes.Buffer) {\n\tif len(p.out) > 0 {\n\t\tif p.WithAnnotations {\n\t\t\tout.Write([]byte(sourcesHeader))\n\t\t}\n\t\tout.Write(p.out)\n\t}\n}\n\ntype BuildParser struct {\n\tBuilders        []*template.Builder\n\tWithAnnotations bool\n","sourceCodeStart":1255,"sourceCodeEnd":1291,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/command/hcl2_upgrade.go#L1255-L1291","documentation":"Warning-level error emitted by `packer hcl2 upgrade`: the template references a builder type that is neither installed as a plugin nor recognized as a known plugin component, so its configuration cannot be fully translated; the builder is listed and left for manual migration.","triggerScenarios":"Thrown at command/hcl2_upgrade.go:1273 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the plugin for the listed builder type via `packer init` or `packer plugins install` and re-run the upgrade","Manually migrate the unknown builder block to an equivalent source block in HCL2"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"eb36e3c3e48a036f3e8cc94087636ee72e1303c9","analyzedAt":"2026-09-05T13:20:43.127Z","contentChangedAt":"2026-09-05T13:20:43.127Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}