runway.cfngin.actions.build module¶
CFNgin build action.
Build a common set of tags to attach to a stack.
-
runway.cfngin.actions.build.
should_update
(stack)[source]¶ Test whether a stack should be submitted for updates to CloudFormation.
- Parameters
stack (
runway.cfngin.stack.Stack
) – The stack object to check.- Returns
If the stack should be updated, return True.
- Return type
-
runway.cfngin.actions.build.
should_submit
(stack)[source]¶ Test whether a stack should be submitted to CF for update/create.
- Parameters
stack (
runway.cfngin.stack.Stack
) – The stack object to check.- Returns
If the stack should be submitted, return True.
- Return type
-
runway.cfngin.actions.build.
should_ensure_cfn_bucket
(outline, dump)[source]¶ Test whether access to the cloudformation template bucket is required.
-
class
runway.cfngin.actions.build.
UsePreviousParameterValue
[source]¶ Bases:
object
Class used to indicate a Parameter should use it’s existing value.
-
runway.cfngin.actions.build.
handle_hooks
(stage, hooks, provider, context, dump, outline)[source]¶ Handle pre/post hooks.
- Parameters
stage (str) – The name of the hook stage - pre_build/post_build.
hooks (list) – A list of dictionaries containing the hooks to execute.
provider (
runway.cfngin.providers.base.BaseProvider
) – The provider the current stack is using.context (
runway.cfngin.context.Context
) – The current CFNgin context.dump (bool) – Whether running with dump set or not.
outline (bool) – Whether running with outline set or not.
-
class
runway.cfngin.actions.build.
Action
(context, provider_builder=None, cancel=None)[source]¶ Bases:
runway.cfngin.actions.base.BaseAction
Responsible for building & coordinating CloudFormation stacks.
Generates the build plan based on stack dependencies (these dependencies are determined automatically based on output lookups from other stacks).
The plan can then either be printed out as an outline or executed. If executed, each stack will get launched in order which entails:
Pushing the generated CloudFormation template to S3 if it has changed
Submitting either a build or update of the given stack to the
runway.cfngin.providers.base.BaseProvider
.
Instantiate class.
- Parameters
context (
runway.cfngin.context.Context
) – The context for the current run.provider_builder (Optional[
BaseProviderBuilder
]) – An object that will build a provider that will be interacted with in order to perform the necessary actions.cancel (threading.Event) – Cancel handler.
-
DESCRIPTION
= 'Create/Update stacks'¶
-
NAME
= 'build'¶
-
static
build_parameters
(stack, provider_stack=None)[source]¶ Build the CloudFormation Parameters for our stack.
- Parameters
stack (
runway.cfngin.stack.Stack
) – A CFNgin stack.provider_stack (Dict[str, Any]) – An optional CFNgin provider object.
- Returns
The parameters for the given stack
- Return type
Dict[str, Any]