runway.cfngin.stack module
CFNgin stack.
- class runway.cfngin.stack.Stack[source]
Bases:
object
Represents gathered information about a stack to be built/updated.
- definition
The stack definition from the config.
- in_progress_behavior
The behavior for when a stack is in
CREATE_IN_PROGRESS
orUPDATE_IN_PROGRESS
.- Type
Optional[Literal[‘wait’]]
- mappings
Cloudformation mappings passed to the blueprint.
- __init__(definition: CfnginStackDefinitionModel, context: CfnginContext, *, variables: Optional[Dict[str, Any]] = None, mappings: Dict[str, Dict[str, Dict[str, Any]]] = None, locked: bool = False, force: bool = False, enabled: bool = True, protected: bool = False)[source]
Instantiate class.
- Parameters
definition – A stack definition.
context – Current context for deploying the stack.
variables – Variables for the stack.
mappings – Cloudformation mappings passed to the blueprint.
locked – Whether or not the stack is locked.
force – Whether to force updates on this stack.
enabled – Whether this stack is enabled
protected – Whether this stack is protected.
- __new__(**kwargs)
- property tags: Dict[str, Any]
Return the tags that should be set on this stack.
Includes both the global tags, as well as any stack specific tags or overrides.
- property parameter_values: Dict[str, Any]
Return all CloudFormation Parameters for the stack.
CloudFormation Parameters can be specified via Blueprint Variables with a
runway.cfngin.blueprints.variables.types.CFNType
type
.- Returns
Dictionary of
<parameter name>: <parameter value>
.
- property all_parameter_definitions: Dict[str, Any]
Return all parameters in the blueprint/template.
- property required_parameter_definitions: Dict[str, Any]
Return all CloudFormation Parameters without a default value.
- resolve(context: CfnginContext, provider: Optional[Provider] = None) None [source]
Resolve the Stack variables.
This resolves the Stack variables and then prepares the Blueprint for rendering by passing the resolved variables to the Blueprint.
- Parameters
context – CFNgin context.
provider – Subclass of the base provider.