Skip to content

Commit cde61ca

Browse files
committed
clarify that order matters in dependent environment variables
Signed-off-by: Michael Crenshaw <[email protected]>
1 parent d0de94b commit cde61ca

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)