Skip to content

Commit 7388997

Browse files
author
Abdelhalim Dadouche
committed
- updated contructor call to match other stacks
- replaced emptyOnDelete by autoDeleteImages because of [WARNING] aws-cdk-lib.aws_ecr.RepositoryProps#autoDeleteImages is deprecated. Use `emptyOnDelete` instead. This API will be removed in the next major release.
1 parent 3f9d517 commit 7388997

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

lib/build-image-repo.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class BuildImageRepoStack extends cdk.Stack {
1616

1717
this.repository = new ecr.Repository(this, 'BuildImageRepo', {
1818
removalPolicy: cdk.RemovalPolicy.DESTROY,
19-
autoDeleteImages: true,
19+
emptyOnDelete: true,
2020
});
2121
}
22-
}
22+
}

lib/network.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ import { LogGroup, RetentionDays } from 'aws-cdk-lib/aws-logs';
1212
export class PipelineNetworkStack extends cdk.Stack {
1313
/** The VPC for the pipeline to reside in. */
1414
public readonly vpc: ec2.IVpc;
15-
16-
constructor(scope: Construct, props?: cdk.StackProps) {
17-
super(scope, 'PipelineNetwork', props);
15+
constructor(scope: Construct, id: string, props?: cdk.StackProps) {
16+
super(scope, id, props);
1817

1918
// We will create a VPC with 3 Private and Public subnets for AWS
2019
// Resources that have network interfaces (e.g. Connecting and EFS

0 commit comments

Comments
 (0)