def parse_stack_set_manifest_v1()

in source/manifest/manifest_parser.py [0:0]


    def parse_stack_set_manifest_v1(self) -> list:

        self.logger.info("Parsing Core Resources from {} file"
                         .format(os.environ.get('MANIFEST_FILE_PATH')))
        build = BuildStateMachineInput(self.manifest.region)
        org = OrganizationsData()
        organizations_data = org.get_organization_details()
        state_machine_inputs = []

        for resource in self.manifest.cloudformation_resources:
            self.logger.info(f">>>> START : {resource.name} >>>>")
            accounts_in_ou = []

            # build OU to accounts map if OU list present in manifest
            if resource.deploy_to_ou:
                accounts_in_ou = org.get_accounts_in_ou(
                    organizations_data.get("OuIdToAccountMap"),
                    organizations_data.get("OuNameToIdMap"),
                    resource.deploy_to_ou
                )

            # convert account numbers to string type
            account_list = convert_list_values_to_string(
                resource.deploy_to_account)
            self.logger.info(">>>>>> ACCOUNT LIST")
            self.logger.info(account_list)

            sanitized_account_list = org.get_final_account_list(
                account_list, organizations_data.get("AccountsInAllOUs"),
                accounts_in_ou, organizations_data.get("NameToAccountMap"))

            self.logger.info("Print merged account list - accounts in manifest"
                             " + account under OU in manifest")
            self.logger.info(sanitized_account_list)

            if resource.deploy_method.lower() == 'stack_set':
                sm_input = build.stack_set_state_machine_input_v1(
                    resource, sanitized_account_list)
                state_machine_inputs.append(sm_input)
            else:
                raise ValueError(
                    f"Unsupported deploy_method: {resource.deploy_method} "
                    f"found for resource {resource.name}")
            self.logger.info(f"<<<<<<<<< FINISH : {resource.name} <<<<<<<<<")

        # Exit if there are no CloudFormation resources
        if len(state_machine_inputs) == 0:
            self.logger.info("CloudFormation resources not found in the "
                             "manifest")
            sys.exit(0)
        else:
            return state_machine_inputs