envvar

Deprecated since version 2.7.0: Replaced by env

Query Syntax

<variable-name>

The envvar lookup type retrieves a value from a variable in the shell’s environment.

Example

# Set an environment variable in the current shell.
$ export DATABASE_USER=root

# In the CFNgin config we could reference the value:
DBUser: ${envvar DATABASE_USER}

# Which would resolve to:
DBUser: root

You can also get the variable name from a file, by using the file:// prefix in the lookup, like so:

DBUser: ${envvar file://dbuser_file.txt}