hashicorp/packer · error
Unknown provisioner %s
Error message
Unknown provisioner %s
What it means
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.
Source
Thrown at packer/maps.go:26
packersdk "github.com/hashicorp/packer-plugin-sdk/packer"
)
type MapOfProvisioner map[string]func() (packersdk.Provisioner, error)
func (mop MapOfProvisioner) Has(provisioner string) bool {
_, res := mop[provisioner]
return res
}
func (mop MapOfProvisioner) Set(provisioner string, starter func() (packersdk.Provisioner, error)) {
mop[provisioner] = starter
}
func (mop MapOfProvisioner) Start(provisioner string) (packersdk.Provisioner, error) {
p, found := mop[provisioner]
if !found {
return nil, fmt.Errorf("Unknown provisioner %s", provisioner)
}
return p()
}
func (mop MapOfProvisioner) List() []string {
res := []string{}
for k := range mop {
res = append(res, k)
}
return res
}
type MapOfPostProcessor map[string]func() (packersdk.PostProcessor, error)
func (mopp MapOfPostProcessor) Has(postProcessor string) bool {
_, res := mopp[postProcessor]
return res
}View on GitHub (pinned to eb36e3c3e4)
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().
Example fix
// before
provisioner "filee" { ... }
// after
provisioner "file" { ... } Defensive patterns
Strategy: validation
Validate before calling
if !provisioners.Has(name) {
return fmt.Errorf("provisioner %q is not installed; run `packer init` (known: %v)", name, provisioners.List())
}
p, err := provisioners.Start(name) Try / catch
if err != nil {
if strings.HasPrefix(err.Error(), "Unknown provisioner") { /* fall back to `packer init` */ }
} Prevention
- 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`.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Unknown post-processor %s
- Unknown builder %s
- Unknown data source %s
- No communicator found for provisioners! This is usually beca
- source must be specified when auto_generate is not enabled
AI-assisted analysis of hashicorp/packer@eb36e3c3e4 (2026-09-05).
Data as JSON: /api/errors/2ff37b1e4b102a7f.
Report an issue: GitHub.