hashicorp/packer · error

The provisioner %s is unknown by Packer, and is likely part

Error message

The provisioner %s is unknown by Packer, and is likely part of a plugin that is not installed.
You may find the needed plugin along with installation instructions documented on the Packer integrations page.

https://developer.hashicorp.com/packer/integrations?filter=%s

What it means

When generating a build's provisioners, Core checks whether the provisioner type exists in the configured plugin set (c.components.PluginConfig.Provisioners.Has). If not, it returns a detailed error saying the provisioner is unknown by Packer and is likely part of a plugin that is not installed, with a link to the integrations page filtered by the provisioner's name (first dash-separated token).

Source

Thrown at packer/core.go:239

			continue
		}

		if pos := sort.SearchStrings(except, n); pos < len(except) && except[pos] == n {
			continue
		}
		r = append(r, n)
	}
	sort.Strings(r)

	return r
}

func (c *Core) generateCoreBuildProvisioner(rawP *template.Provisioner, rawName string) (CoreBuildProvisioner, error) {
	// Get the provisioner
	cbp := CoreBuildProvisioner{}

	if !c.components.PluginConfig.Provisioners.Has(rawP.Type) {
		err := fmt.Errorf(
			"The provisioner %s is unknown by Packer, and is likely part of a plugin that is not installed.\n"+
				"You may find the needed plugin along with installation instructions documented on the Packer integrations page.\n\n"+
				"https://developer.hashicorp.com/packer/integrations?filter=%s",
			rawP.Type,
			strings.Split(rawP.Type, "-")[0],
		)

		if sugg := didyoumean.NameSuggestion(rawP.Type, c.components.PluginConfig.Provisioners.List()); sugg != "" {
			err = fmt.Errorf("Did you mean to use %q?", sugg)
		}

		return cbp, err
	}

	provisioner, err := c.components.PluginConfig.Provisioners.Start(rawP.Type)
	if err != nil {
		return cbp, fmt.Errorf(
			"error initializing provisioner '%s': %s",

View on GitHub (pinned to eb36e3c3e4)

Solutions

  1. Run `packer init .` in the template directory to install all required_plugins
  2. Install the missing plugin explicitly: packer plugins install <organization>/<name>
  3. Check the provisioner type spelling in the template against installed plugins (`packer plugins installed`)
  4. If the provisioner is a legacy built-in that moved to a plugin, update the template to the new plugin source

Example fix

// before (HCL2)
# required_plugins block missing
provisioner "ansible" { playbook_file = "./site.yml" }
// after (HCL2)
packer {
  required_plugins {
    ansible = { version = "= 1.1.0", source = "github.com/hashicorp/ansible" }
  }
}
provisioner "ansible" { playbook_file = "./site.yml" }
# then run: packer init .
Defensive patterns

Strategy: validation

Validate before calling

// Before building, ensure plugins are resolved:
//   packer init .
//   packer plugins installed
// Or programmatically check the plugin set:
if !core.Components.PluginConfig.Provisioners.Has(provisionerType) {
    return fmt.Errorf("provisioner %q not installed; run packer init", provisionerType)
}

Try / catch

if err := core.Build(name); err != nil {
    if strings.Contains(err.Error(), "is unknown by Packer") {
        return fmt.Errorf("missing plugin for %q — run `packer init .`: %w", name, err)
    }
    return err
}

Prevention

When it happens

Trigger: A template declares provisioners with a type whose plugin binary is not installed/discovered — e.g. `provisioner "ansible" {}` without the ansible plugin installed, a misspelled type, or `packer init` not run after adding the plugin to required_plugins.

Common situations: New machine or CI runner without installed plugins; forgot `packer init` to fetch required_plugins; plugin installed under a name that doesn't match the template's type; typo like "sheel" instead of "shell"; using a built-in-only type from old templates where the provisioner moved to a separate plugin.

Related errors


AI-assisted analysis of hashicorp/packer@eb36e3c3e4 (2026-09-05). Data as JSON: /api/errors/11c2977c8c3bd76c. Report an issue: GitHub.