---
description: >
  The locals block also called the local-variable block defines locals within
  your Packer configuration. 
layout: docs
page_title: locals - Blocks
sidebar_title: <tt>locals</tt>
---

# 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](/docs/from-1.5/locals) description for a more
  thorough read.
- Read the [variables guide](/guides/hcl/variables) for more examples.
