ecs_composex.common.stacks package

Module contents

Module to handle Root stacks and substacks in ECS composeX. Allows to treat everything in memory before uploading files into S3 and on disk.

class ecs_composex.common.stacks. ComposeXStack ( name , stack_template , stack_parameters = None , file_name = None , module_name = None , module = None , ** kwargs ) [source]

Bases: Stack

Class to define a CFN Stack as a composition of its template object, parameters, tags etc.

Variables :

template_file ( ecs_composex.common.files.FileArtifact ) – The FileArtifact associated with the stack.

add_dependencies ( dependencies ) [source]

Function to add dependencies to DependsOn :return:

add_parameter ( parameter ) [source]

Function to add a parameter or set of parameters to the stack :type parameter: :param parameter: :return:

attributes : List[str] = ['Condition', 'CreationPolicy', 'DeletionPolicy', 'DependsOn', 'Metadata', 'UpdatePolicy', 'UpdateReplacePolicy']
get_top_root_stack ( stack_stop = None ) [source]
is_void = False
mappings = {}
mark_nested_stacks ( ) [source]

Method to go over the stack resources, identify the nested stacks, and set a marker of the parent to them

render ( settings ) [source]

Function to use when the template is finalized and can be uploaded to S3.

render_parameters_list_cfn ( ) [source]

Renders parameters in a CFN parameters config file format

Returns :

params

Return type :

list

set_vpc_parameters_from_vpc_stack ( vpc_stack , settings , * parameters ) [source]

When a new VPC is created (vpc comes from nested stack), adds the subnets parameters and updates the stack parameters in the root stack.

set_vpc_params_from_vpc_lookup ( vpc_stack , settings ) [source]

Method to set the stack parameters when we are not creating a VPC.

Return type :

None

write_config_file ( settings ) [source]

Method to write the parameters file for the stack. Only uses manual input.

ecs_composex.common.stacks. process_stacks ( root_stack , settings , is_root = True ) [source]

Function to go through all stacks of a given template and update the template It will recursively render sub stacks defined.

Parameters :
ecs_composex.common.stacks. render_codepipeline_config_file ( parameters ) [source]

Method to write all the parameters in the AWS CFN Config format for Codepipeline :param list parameters: :return: