---
description: >
  The locals block also called the local-variable block defines locals within
  your Packer configuration.
page_title: locals - Blocks
---

# The `locals` block

`@include 'from-1.5/beta-hcl2-note.mdx'`

The `locals` block, also called the `local-variable` block, defines locals within
your Packer configuration.

`@include 'from-1.5/locals/example-block.mdx'`

# More on variables

- Read the [full locals](/packer/docs/templates/hcl_templates/locals) description for a more
  thorough read.
- Read the [variables guide](/packer/guides/hcl/variables) for more examples.
