private getInitializeCoreAccountsActions()

in source/repositories/compliant-framework-central-pipeline/lib/core-pipeline-stack.ts [112:180]


  private getInitializeCoreAccountsActions(): codepipeline.IAction[] {
    var actions: codepipeline.IAction[] = []

    var output = new codepipeline.Artifact()

    var runOrder = 1

    for (const region of this.props.config.deployToRegions) {

      runOrder += this.addCloudformationCreateUpdateStackAction(
        actions,
        region,
        {
          actionName: 'LoggingInit',
          stackName: 'logging-init',
          templatePath: this.sources[cfw.CENTRAL_CORE].output.atPath(
            'templates/logging/logging-init.yml'),
          templatePrefix: `${this.sources[cfw.CENTRAL_CORE].repo.repositoryName}`,
          bucketRegionalDomainName: this.s3Bucket.bucketRegionalDomainName,
          parameterOverrides: {
            ['pSolutionInfoVersion']: this.props.solutionInfo.version,
            ['pS3Bucket']: this.s3Bucket.bucketName,
            ['pS3Region']: cfw.getS3Region(this.region),
            ['pRepo']: this.sources[cfw.CENTRAL_CORE].repo.repositoryName,
            ['pCentralAccountId']: this.props.config.central.accountId,
            ['pPrimaryRegion']: this.props.config.core.primaryRegion,
            ['pNotificationsEmail']: this.props.config.core.notificationsEmail,
            ['pPrincipalOrgId']: this.props.config.central.organizationId
          },
          capabilities: CfnCapabilities.NAMED_IAM,
          account: this.props.config.logging.accountId,
          output: output,
          outputFileName: `logging-init-${this.props.config.core.primaryRegion}.output`,
        },
        runOrder,
        true
      );

      runOrder += this.addCloudformationCreateUpdateStackAction(
        actions,
        region,
        {
          actionName: 'CentralInit',
          stackName: 'central-init',
          templatePath: this.sources[cfw.CENTRAL_CORE].output.atPath(
            'templates/central/central-init.yml'),
          templatePrefix: this.sources[cfw.CENTRAL_CORE].repo.repositoryName,
          bucketRegionalDomainName: this.s3Bucket.bucketRegionalDomainName,
          parameterOverrides: {
            ['pSolutionInfoVersion']: this.props.solutionInfo.version,
            ['pS3Bucket']: this.s3Bucket.bucketName,
            ['pS3Region']: cfw.getS3Region(this.region),
            ['pRepo']: this.sources[cfw.CENTRAL_CORE].repo.repositoryName,
            ['pLoggingAccountId']: this.props.config.logging.accountId,
            ['pPrimaryRegion']: this.props.config.core.primaryRegion,
            ['pNotificationsEmail']: this.props.config.core.notificationsEmail,
            ['pConsolidatedLogsS3BucketCmkArn']: output.getParam(`logging-init-${this.props.config.core.primaryRegion}.output`, 'oConsolidatedLogsS3BucketCmkArn')
          },
          capabilities: CfnCapabilities.NAMED_IAM,
          account: this.props.config.central.accountId,
          extraInputs: [output]
        },
        runOrder,
        false
      );
    }

    return (actions)
  }