website/content/docs/templates/index.mdx
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
[!IMPORTANT]
Documentation Update: Product documentation previously located in/websitehas moved to thehashicorp/web-unified-docsrepository, where all product documentation is now centralized. Please make contributions directly toweb-unified-docs, since changes to/websitein this repository will not appear on developer.hashicorp.com. ⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
This topic provides overview information about Packer templates, which are configuration files that determine Packer behavior.
A Packer template contains a series of declarations and commands for Packer to follow. Templates define the following instructions for Packer:
The template contains flexible variable injection tools, as well as built-in functions to help you customize your builds.
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.