constructor()

in deployment/lib/build-artifact-stack.ts [15:41]


  constructor(scope: Construct, id: string, props: BuildArtifactStackProps) {
    super(scope, id, props);

    const buildAgentPrincipleParam = new CfnParameter(this, 'buildAgentRoleArn', {
      description: 'The role arn of the build agent',
      allowedPattern: '.+',
    });

    let buildBucket;
    if (props.useExistingBucketAndRoles) {
      const buildBucketParam = new CfnParameter(this, 'buildBucketArn', {
        description: 'The arn of the existing build bucket',
        allowedPattern: '.+',
      });
      buildBucket = buildBucketParam.valueAsString;
    }

    const buckets = new Buckets(this, buildBucket);

    const identities = new Identities(this, {
      buildBucket: buckets.BuildBucket,
      useExistingRoles: props.useExistingBucketAndRoles,
      buildAgentPrinciple: new ArnPrincipal(buildAgentPrincipleParam.valueAsString),
    });

    const artifactPublicAccess = new ArtifactsPublicAccess(this, buckets.BuildBucket, props.useExistingBucketAndRoles);
  }