---
description: >
  The `locals` and `local-variable` blocks declare local variables in
  your Packer configuration. Learn how to use these blocks to declare local variables in your template.
page_title: locals block reference
---

# `locals` block

This topic provides reference information about the `locals` block.

## Description

The `locals` and `local-variable` blocks declare local variables in
your Packer configuration.

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

Refer to the following topics for additional information about using the `locals` and `local-variable` blocks:

- [Local Variables](/packer/docs/templates/hcl_templates/locals)
- [Input Variables and local variables](/packer/guides/hcl/variables)
