def cloudformation(registry, xml_parent, data):
 region_dict = helpers.cloudformation_region_dict()
 stacks = helpers.cloudformation_init(xml_parent, data, 'CloudFormationPostBuildNotifier')
 for stack in data.get('create-stacks', []):
  helpers.cloudformation_stack(xml_parent, stack, 'PostBuildStackBean', stacks, region_dict)
 delete_stacks = helpers.cloudformation_init(xml_parent, data, 'CloudFormationNotifier')
 for delete_stack in data.get('delete-stacks', []):
  helpers.cloudformation_stack(xml_parent, delete_stack, 'SimpleStackBean', delete_stacks, region_dict)

def cloudformation ( registry , xml_parent , data ) : region_dict = helpers . cloudformation_region_dict ( ) stacks = helpers . cloudformation_init ( xml_parent , data , 'CloudFormationPostBuildNotifier' ) for stack in data . get ( 'create-stacks' , [ ] ) : helpers . cloudformation_stack ( xml_parent , stack , 'PostBuildStackBean' , stacks , region_dict ) delete_stacks = helpers . cloudformation_init ( xml_parent , data , 'CloudFormationNotifier' ) for delete_stack in data . get ( 'delete-stacks' , [ ] ) : helpers . cloudformation_stack ( xml_parent , delete_stack , 'SimpleStackBean' , delete_stacks , region_dict )
yaml: cloudformation create cloudformation stacks before running a build and optionally delete them at the end .