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_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'] ¶
- 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.
- 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 :
-
-
root_stack ( ecs_composex.common.stacks.ComposeXStack ) – the root template to iterate over the resources.
-
settings ( ecs_composex.common.settings.ComposeXSettings ) – The settings for execution
-
is_root ( bool ) – Allows to know whether the stack is parent stack
-