{"record":{"id":"2ff37b1e4b102a7f","repo":"hashicorp/packer","slug":"unknown-provisioner-s","errorCode":null,"errorMessage":"Unknown provisioner %s","messagePattern":"Unknown provisioner (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packer/maps.go","lineNumber":26,"sourceCode":"\n\tpackersdk \"github.com/hashicorp/packer-plugin-sdk/packer\"\n)\n\ntype MapOfProvisioner map[string]func() (packersdk.Provisioner, error)\n\nfunc (mop MapOfProvisioner) Has(provisioner string) bool {\n\t_, res := mop[provisioner]\n\treturn res\n}\n\nfunc (mop MapOfProvisioner) Set(provisioner string, starter func() (packersdk.Provisioner, error)) {\n\tmop[provisioner] = starter\n}\n\nfunc (mop MapOfProvisioner) Start(provisioner string) (packersdk.Provisioner, error) {\n\tp, found := mop[provisioner]\n\tif !found {\n\t\treturn nil, fmt.Errorf(\"Unknown provisioner %s\", provisioner)\n\t}\n\treturn p()\n}\n\nfunc (mop MapOfProvisioner) List() []string {\n\tres := []string{}\n\tfor k := range mop {\n\t\tres = append(res, k)\n\t}\n\treturn res\n}\n\ntype MapOfPostProcessor map[string]func() (packersdk.PostProcessor, error)\n\nfunc (mopp MapOfPostProcessor) Has(postProcessor string) bool {\n\t_, res := mopp[postProcessor]\n\treturn res\n}","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/hashicorp/packer/blob/eb36e3c3e48a036f3e8cc94087636ee72e1303c9/packer/maps.go#L8-L44","documentation":"MapOfProvisioner.Start looks up a provisioner by name in the plugin registry map and returns this error when the name is not registered. It signals that Packer cannot find a provisioner binary/builtin matching the requested name — typically the plugin was never Set() into the map or the name is misspelled in the template.","triggerScenarios":"Calling Start(name) with a name absent from the map: a template provisioner block whose type is misspelled (e.g. \"provisioners\" instead of \"provisioner\"), a third-party plugin not installed in the plugin directory, or a plugin name with wrong casing (map lookups are case-sensitive).","commonSituations":"Typo in the provisioner \"type\" field in an HCL2/JSON template; using a custom plugin without running `packer init`; Packer version mismatch where the provisioner was removed or renamed; plugin binary not named per the expected packer-plugin-* convention.","solutions":["Check the provisioner \"type\" in the template for spelling/casing against `packer plugins installed` or the List() output.","Run `packer init .` to install missing third-party plugins declared in required_plugins.","Verify the plugin binary exists in PACKER_PLUGIN_PATH with the correct naming scheme.","If embedding plugins in Go, confirm Set() is called on the MapOfProvisioner before Start()."],"exampleFix":"// before\nprovisioner \"filee\" { ... }\n\n// after\nprovisioner \"file\" { ... }","handlingStrategy":"validation","validationCode":"if !provisioners.Has(name) {\n    return fmt.Errorf(\"provisioner %q is not installed; run `packer init` (known: %v)\", name, provisioners.List())\n}\np, err := provisioners.Start(name)","typeGuard":null,"tryCatchPattern":"if err != nil {\n    if strings.HasPrefix(err.Error(), \"Unknown provisioner\") { /* fall back to `packer init` */ }\n}","preventionTips":["Declare all third-party provisioners in required_plugins and run `packer init` before building.","Validate templates with `packer validate` before running builds.","Check casing/spelling of type against List()/`packer plugins list`."],"tags":["plugin-registry","provisioner","config"],"backgroundTag":"unknown-component-type","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"}