> For the complete documentation index, see [llms.txt](https://targets.takomo.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://targets.takomo.io/configuration/variables.md).

# Variables

You can specify variables for deployment groups and deployment targets with the `vars` property. It is an object whose keys are variable names and values contain the values for the corresponding variables. Variable values can be strings, numbers, booleans, objects or lists of the aforementioned types.&#x20;

Deployment groups inherit variables from their parents, and deployment targets inherit variables from the deployment group they belong to.

If you want to apply variables to all deployment groups and targets, you can define the `vars` property at the top-level of the deployment configuration.

#### Example

Here's how you could use variables:

{% code title="deployment/targets.yml" %}

```yaml
vars:
  cost-center: 12345
  budget: 2000

deploymentGroups:
  all:
    configSets: security
  all/shared:
    vars:
      cost-center: 10000 
      budget: 500 
    targets:
      - name: infra
  all/application:
    configSets: networking
    deploymentRoleName: deployer
    vars:
      cost-center: 600
  all/application/dev:
    targets:
      - name: dev-environment
        vars:
          environment: dev
      - name: sandbox
        vars:
          environment: sandbox
  all/application/prod:
    targets:
      - name: prod-environment
        vars:
          environment: prod
          budget: 3000
```

{% endcode %}

We specify **cost-center** and **budget** variables to be applied to all deployment groups and targets using the top-level `vars` property. The **all/shared** deployment group overrides both of these variables, and **all/application** overrides only the **cost-center**. The targets located under the **all/application** specify a new variable named **environment**. The **prod-environment** target overrides the **budget** variable.&#x20;


---

# 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, and the optional `goal` query parameter:

```
GET https://targets.takomo.io/configuration/variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
