> For the complete documentation index, see [llms.txt](https://docs.brainboard.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.brainboard.co/cloud-design/left-bar/input-and-output/locals.md).

# Locals

A **local value** assigns a name to an [expression](https://developer.hashicorp.com/terraform/language/expressions), so you can use the name multiple times within a module instead of repeating the expression.&#x20;

{% hint style="success" %} <mark style="color:$primary;">**Brainboard**</mark> allows you to define multiple locals.
{% endhint %}

{% hint style="info" %}
When you define locals in **Brainboard**, they are added to the <mark style="color:$primary;">**`locals.tf`**</mark> file and in the same block <mark style="color:$primary;">**`locals`**</mark>&#x20;
{% endhint %}

{% hint style="warning" icon="hand-point-right" %}
*The table of locals is similar to the table of* [*variables*](/cloud-design/left-bar/input-and-output/variables.md)*. Please refer to it to understand the different components of the user interface.*
{% endhint %}

#### Creating a new local

1. Click the <mark style="color:$primary;">**`Locals`**</mark> icon available in the right panel.&#x20;
2. Then, click the <mark style="color:$primary;">**`+`**</mark> icon to add/import variables. It opens the **Create local** modal.
3. Specify the *<mark style="color:$primary;">Name</mark>, <mark style="color:$primary;">Description</mark>* and *<mark style="color:$primary;">Value</mark>* of the local.

<figure><img src="/files/MfCG9dCKdA9xuUzlobu5" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
If you are using a complex expression in the value field, you need to quote it, as you can mix **strings, functions, and variables.**
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.brainboard.co/cloud-design/left-bar/input-and-output/locals.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
