# Tags

You specify stack tags with the `tags` property. CloudFormation automatically adds the tags to each resource in the stack that supports tagging.

#### Examples

Setting tags:

```yaml
tags:
  foo: bar
  code: 123
  backups: true
```

## Where to define

The `tags` property can be defined in stack and stack group configuration files. If specified in a stack group, the stack group's children and stacks inherit the value. Stack groups and stacks can add new tags and overwrite individual tags they inherited from their parent by specifying a new value with the same key.

## Requirements

The `tags` property must satisfy these requirements:

* Each tag key must be a string
* Each tag value must be a string, a number or a boolean


---

# Agent Instructions: 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.takomo.io/stack-properties/tags.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.
