runway.lookups.handlers.env module¶
Retrieve a value from an environment variable.
- class runway.lookups.handlers.env.EnvLookup[source]¶
Bases:
LookupHandler
[CfnginContext | RunwayContext
]Environment variable Lookup.
- classmethod handle(value: str, context: CfnginContext | RunwayContext, **_kwargs: Any) Any [source]¶
Retrieve an environment variable.
The value is retrieved from a copy of the current environment variables that is saved to the context object. These environment variables are manipulated at runtime by Runway to fill in additional values such as
DEPLOY_ENVIRONMENT
andAWS_REGION
to match the current execution.- Parameters:
value – The value passed to the Lookup.
context – The current context object.
- Raises:
ValueError – Unable to find a value for the provided query and a default value was not provided.