Skip to content

Commit

Permalink
feat(config): allow environment[].variables to reference top-level va…
Browse files Browse the repository at this point in the history
…rs (#1910)

* feat(config): allow environment[].variables to reference top-level vars

Also fixes the issue where template strings were resolved in all
environments, instead of just the selected one.

Fixes #1814
  • Loading branch information
edvald authored and eysi09 committed Jun 27, 2020
1 parent c1e2ad8 commit fec2b53
Show file tree
Hide file tree
Showing 9 changed files with 543 additions and 173 deletions.
5 changes: 3 additions & 2 deletions docs/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ environments:
varfile:

# A key/value map of variables that modules can reference when using this environment. These take precedence over
# variables defined in the top-level `variables` field.
# variables defined in the top-level `variables` field, but may also reference the top-level variables in template
# strings.
variables: {}

# A list of providers that should be used for this project, and their configuration. Please refer to individual
Expand Down Expand Up @@ -330,7 +331,7 @@ environments:

[environments](#environments) > variables

A key/value map of variables that modules can reference when using this environment. These take precedence over variables defined in the top-level `variables` field.
A key/value map of variables that modules can reference when using this environment. These take precedence over variables defined in the top-level `variables` field, but may also reference the top-level variables in template strings.

| Type | Default | Required |
| -------- | ------- | -------- |
Expand Down
Loading

0 comments on commit fec2b53

Please sign in to comment.