Packer "Unknown builder type" in CI
Packer could not resolve the builder named in a source block to any installed plugin. Since 1.7 the builders ship as external plugins, so an uninstalled plugin surfaces as an unknown type.
What this error means
packer build or validate fails with "1 error occurred: Unknown builder type: X" and lists only the built-in types (file, null) as known.
Error: 1 error occurred:
* Unknown builder type: amazon-ebs
known builder types: file, nullCommon causes
The plugin providing the builder is not installed
For 1.7+, amazon-ebs, googlecompute, and similar live in plugins. Without packer init, only file and null are known.
A typo in the source block type
The source line names a builder that does not exist, for example amazon_ebs instead of amazon-ebs.
How to fix it
Install the plugin with packer init
- Declare the plugin in
required_plugins. - Run
packer initbefore build so the builder type is registered. - Re-run build and confirm the type resolves.
packer init .
packer build .Correct the builder name
Match the type exactly, for example source "amazon-ebs" "ubuntu", with hyphens not underscores.
source "amazon-ebs" "ubuntu" {
region = "us-east-1"
instance_type = "t3.micro"
}How to prevent it
- Run
packer initbefore build for any 1.7+ template. - Copy builder type names from plugin docs to avoid typos.
- Cache plugins so the builder stays registered across jobs.