You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/content/docs/templates/hcl_templates/blocks/locals.mdx

28 lines
1.3 KiB

---
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
---
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
# `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)