github.com/hashicorp/packer@v1.14.3/website/content/docs/templates/index.mdx (about) 1 --- 2 description: | 3 Packer templates are configuration files that determine Packer behavior. Learn about the Packer template configuration language. 4 page_title: Packer templates reference overview 5 --- 6 7 # Packer templates reference overview 8 9 This topic provides overview information about Packer templates, which are configuration files that determine Packer behavior. 10 11 ## Introduction 12 13 A Packer template contains a series of declarations and commands for Packer to follow. Templates define the following instructions for Packer: 14 15 - Which plugins, such as builders, provisioners, and post-processors to use 16 - How to configure the plugins 17 - In what order to run them 18 19 The template contains flexible variable injection tools, as well as built-in 20 functions to help you customize your builds. 21 22 ## Template language 23 24 Packer supports templates written in [HCL2](/packer/docs/templates/hcl_templates) or [JSON](/packer/docs/templates/legacy_json_templates). Since v1.7.0, HCL2 is the official format for Packer configurations. 25 26 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](/packer/tutorials/configuration-language/hcl2-upgrade) for a tutorial on upgrading JSON templates to HCL templates.