constructor()

in lib/cicd-s3-stack.ts [32:59]


  constructor(scope: cdk.Construct, id: string, props: S3StackProps) {
    super(scope, id, props)

    const bucketName = `${props.prefix}-${config.sharedResources.cicdBucket}`

    const artifactsBucket = new Bucket(this, 'artifactsBucket', {
      bucketName: bucketName,
      versioned: false,
      lifecycleRules: [{
          enabled: true,
          expiration: cdk.Duration.days(14)
        }
      ]
    })

    new ssm.StringParameter(this, 'cicdArtifactsBucketNameParam', {
      description: 'Name of the CICD artifacts Bucket',
      parameterName: `${props.ssmRoot}/buckets/cicdArtifactsBucketName`,
      stringValue: artifactsBucket.bucketName
    })

    new ssm.StringParameter(this, 'cicdArtifactsBucketArnParam', {
      description: 'Arn of the CICD artifacts Bucket',
      parameterName: `${props.ssmRoot}/buckets/cicdArtifactsBucketArn`,
      stringValue: artifactsBucket.bucketArn
    })

  }