Packer is a tool for building machine images from a single source template. You declare a source — an AWS AMI, an Azure managed image, a VMware or VirtualBox virtual machine, a Docker image, a GCP image — and a set of provisioning steps, and Packer starts a temporary instance, runs the provisioners against it, captures the result as an image and destroys the instance. The output is an artefact you can boot repeatedly and identically, which is the foundation of immutable infrastructure: servers stop being configured in place and start being replaced.
Modern Packer templates are written in HCL2. A `source` block describes where the image comes from and what it is built on; one or more `build` blocks attach provisioners to sources; variables, locals and `packer init` with `required_plugins` give the template the same parameterisation and dependency pinning Terraform users already recognise. Because build blocks can reference several sources at once, one template can produce an AMI, an Azure image and a Vagrant box from the same provisioning steps in parallel — which is what makes multi-cloud parity achievable rather than aspirational.
Packer deliberately does not do configuration management. It delegates: shell and PowerShell provisioners for straightforward steps, and Ansible, Chef, Puppet or Salt when the image should be built by the same code that manages running fleets. Post-processors handle what happens after the image exists — writing a manifest, tagging, converting formats, uploading to a registry. That division of labour, plus `packer fmt`, `validate` and `inspect`, is what lets an image build sit safely inside a CI pipeline.
Why this skill matters now
The bake-versus-configure argument has largely settled. Autoscaling groups, spot instances and Kubernetes nodes all need machines that come up ready in seconds, and a node that must run a fifteen-minute configuration pass before it can serve traffic is not a node you can scale on. Pre-baked images move that work to build time, where it can fail safely and be tested, rather than to boot time, where it fails under load.
Security and compliance push the same direction. A golden image built from a hardened base, scanned once and promoted through environments is a far easier control to evidence than an estate of long-lived servers patched in place. When a CVE lands, replacing images and rolling instances is a bounded, repeatable operation; patching a thousand running hosts is not. Organisations with a real audit obligation increasingly require that images come from a pipeline, not from a person.
The practical driver is Terraform. Terraform provisions from an image ID, and the quality of that image determines how much the Terraform code has to compensate for. Teams that adopt Terraform without an image pipeline end up doing configuration management inside user-data scripts, which is the worst of both worlds. Packer is the piece that makes the immutable story complete, which is why the two skills are usually hired together.