Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issues/3066 - add include description #3070

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/_docs/02_features/locals.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ locals {
Currently you can only reference `locals` defined in the same config file. `terragrunt` does not automatically include
`locals` defined in the parent config of an `include` block into the current context. If you wish to reuse variables
globally, consider using `yaml` or `json` files that are included and merged using the `terraform` built in functions
available to `terragrunt`.
available to `terragrunt`. Find an example below.

For example, suppose you had the following directory tree:
Another alternative may be using the option `merge_strategy = "deep"` of the [`include` configuration block](https://terragrunt.gruntwork.io/docs/reference/config-blocks-and-attributes/#include).

**Example for using `yaml` or `json` files:**

Suppose you had the following directory tree:

```
.
Expand Down