runway.cfngin.lookups.handlers.envvar module

Environment variable lookup.

class runway.cfngin.lookups.handlers.envvar.EnvvarLookup[source]

Bases: runway.lookups.handlers.base.LookupHandler

Environment variable lookup.

classmethod handle(value, context=None, provider=None, **kwargs)[source]

Retrieve an environment variable.



# With CFNgin we would reference the environment variable like this:
conf_key: ${envvar ENV_VAR_NAME}

You can optionally store the value in a file, ie:

$ cat envvar_value.txt

and reference it within CFNgin (NOTE: the path should be relative to the CFNgin config file):

conf_key: ${envvar file://envvar_value.txt}

# Both of the above would resolve to
conf_key: ENV_VALUE