runway.cfngin.lookups.handlers.default module¶
Lookup to provide a default value.
- class runway.cfngin.lookups.handlers.default.DefaultLookup[source]¶
Bases:
LookupHandler
[CfnginContext
]Lookup to provide a default value.
- classmethod handle(value: str, context: CfnginContext | None = None, **_: Any) Any [source]¶
Use a value from the environment or fall back to a default value.
Allows defaults to be set at the config file level.
- Parameters:
value – Parameter(s) given to this lookup.
<env_var>::<default value>
context – Context instance.
Example
Groups: ${default app_security_groups::sg-12345,sg-67890}
If
app_security_groups
is defined in the environment, its defined value will be returned. Otherwise,sg-12345,sg-67890
will be the returned value.