runway.cfngin.lookups.handlers.default module

Lookup to provide a default value.

class runway.cfngin.lookups.handlers.default.DefaultLookup[source]

Bases: runway.lookups.handlers.base.LookupHandler

Lookup to provide a default value.

classmethod handle(value, context=None, provider=None, **kwargs)[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
Returns

Looked up value

Return type

str

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 thereturned value.