Skip to content

Commit 17a4caa

Browse files
authored
Merge pull request #35743 from crenshaw-dev/clarify-env-var-dependency-order
clarify that order matters in dependent environment variables
2 parents d0791aa + 6c94bd7 commit 17a4caa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

content/en/docs/tasks/inject-data-application/define-interdependent-environment-variables.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ As shown above, you have defined the correct dependency reference of `SERVICE_AD
6464
When an environment variable is already defined when being referenced,
6565
the reference can be correctly resolved, such as in the `SERVICE_ADDRESS` case.
6666

67+
Note that order matters in the `env` list. An environment variable is not considered
68+
"defined" if it is specified further down the list. That is why `UNCHANGED_REFERENCE`
69+
fails to resolve `$(PROTOCOL)` in the example above.
70+
6771
When the environment variable is undefined or only includes some variables, the undefined environment variable is treated as a normal string, such as `UNCHANGED_REFERENCE`. Note that incorrectly parsed environment variables, in general, will not block the container from starting.
6872

6973
The `$(VAR_NAME)` syntax can be escaped with a double `$`, ie: `$$(VAR_NAME)`.

0 commit comments

Comments
 (0)