Skip to content

Commit

Permalink
remove build-image resources on stack delete
Browse files Browse the repository at this point in the history
  • Loading branch information
nateglims committed Aug 15, 2023
1 parent 135a698 commit 4e524a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions demos-pipeline/lib/lib/build-image-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export class BuildImageDataStack extends cdk.Stack {
const dataBucket = new s3.Bucket(this, "BuildImageDataBucket", {
bucketName,
versioned: true,
removalPolicy: cdk.RemovalPolicy.DESTROY,
});

const dataBucketDeploymentRole = new iam.Role(
Expand Down
4 changes: 3 additions & 1 deletion demos-pipeline/lib/lib/build-image-repo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export class BuildImageRepoStack extends cdk.Stack {
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
super(scope, id, props);

this.repository = new ecr.Repository(this, "BuildImageRepo", {});
this.repository = new ecr.Repository(this, "BuildImageRepo", {
removalPolicy: cdk.RemovalPolicy.DESTROY,
});
}
}

0 comments on commit 4e524a8

Please sign in to comment.