(aws-cdk-lib/aws-ecr): (Cannot delete images upon ECR repo removal when multiple repo provisioned) #25388
Labels
@aws-cdk/aws-ecr
Related to Amazon Elastic Container Registry
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p1
Describe the bug
When you provision two ECR repositories, you cannot delete both repositories even if the
removalPolicy
property isRemovalPolicy.DESTROY
and theautoDeleteImages
property istrue
.Expected Behavior
Run
cdk destroy
and both two repositories is deleted.Current Behavior
Run
cdk destroy
and only one repository is deleted.Reproduction Steps
Edit
lib/ecr-debug-stack.ts
and deploy the stack.When you run
cdk destroy
the following error occurs.Possible Solution
Generated IAM policy for custom resource is allowed to perform
ecr:DescribeRepositories
to only one repository.Additional Information/Context
No response
CDK CLI Version
2.70.0 (build c13a0f1)
Framework Version
No response
Node.js Version
v18.12.1
OS
Amazon Linux 2
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: