runway.cfngin.stack module¶
CFNgin stack.
-
class
runway.cfngin.stack.
Stack
(definition, context, variables=None, mappings=None, locked=False, force=False, enabled=True, protected=False)[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[str]
Instantiate class.
- Parameters
definition (
runway.cfngin.config.Stack
) – A stack definition.context (
runway.cfngin.context.Context
) – Current context for building the stack.variables (Optional[Dict[str, Any]]) – Variables for the stack.
mappings (Optional[Dict[str, Dict[str, Any]]]) – Cloudformation mappings passed to the blueprint.
locked (bool) – Whether or not the stack is locked.
force (bool) – Whether to force updates on this stack.
enabled (bool) – Whether this stack is enabled
protected (bool) – Whether this stack is protected.
-
property
required_by
¶ Return a list of stack names that depend on this stack.
- Returns
List[str]
-
property
requires
¶ Return a list of stack names this stack depends on.
- Returns
List[str]
-
property
stack_policy
¶ Return the Stack Policy to use for this stack.
-
property
blueprint
¶ Return the blueprint associated with this stack.
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
¶ 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>
.- Return type
Dict[str, Any]
-
property
all_parameter_definitions
¶ Return a list of all parameters in the blueprint/template.
Dict[str, Dict[str, str]]: parameter definitions. Keys are parameter names, the values are dicts containing key/values for various parameter properties.
-
property
required_parameter_definitions
¶ Return all CloudFormation Parameters without a default value.
-
resolve
(context, provider)[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 (
runway.cfngin.context.Context
) – CFNgin context.provider (
runway.cfngin.providers.base.BaseProvider
) – Subclass of the base provider.
-