Packer
Packer templates reference overview
This topic provides overview information about Packer templates, which are configuration files that determine Packer behavior.
Introduction
A Packer template contains a series of declarations and commands for Packer to follow. Templates define the following instructions for Packer:
- Which plugins, such as builders, provisioners, and post-processors to use
- How to configure the plugins
- In what order to run them
The template contains flexible variable injection tools, as well as built-in functions to help you customize your builds.
Template language
Packer supports templates written in HCL2 or JSON. Since v1.7.0, HCL2 is the official format for Packer configurations.
HCL2 is also the configuration language used in configurations for other HashiCorp products, such as Terraform. HCL is more flexible, modular, and concise than the JSON template format. Refer to Upgrade Packer JSON template to HCL2 for a tutorial on upgrading JSON templates to HCL templates.