Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to Delete AWS ECR Public Repositories Containing Images using Cloud Control #1155

Open
fridim opened this issue Nov 20, 2023 · 0 comments · May be fixed by #1157
Open

Failure to Delete AWS ECR Public Repositories Containing Images using Cloud Control #1155

fridim opened this issue Nov 20, 2023 · 0 comments · May be fixed by #1157

Comments

@fridim
Copy link

fridim commented Nov 20, 2023

Problem Summary:
When attempting to delete AWS ECR Public Repositories that still contain images using aws-nuke (which currently uses AWS Cloud Control), the operation fails. This issue is specific to the use of the cloud-control API for AWS::ECR::PublicRepository.

cloud-control doesn't delete images inside the repository, so using cloud control in aws-nuke for AWS::ECR::PublicRepository doesn't properly work today.

Symptom:
aws-nuke loops forever

us-east-1 - AWS::ECR::PublicRepository - jboss-eap - [Identifier: "jboss-eap", RepositoryName: "jboss-eap"] - waiting

Removal requested: 1 waiting, 0 failed, 68 skipped, 0 finished

us-east-1 - AWS::ECR::PublicRepository - jboss-eap - [Identifier: "jboss-eap", RepositoryName: "jboss-eap"] - waiting

Removal requested: 1 waiting, 0 failed, 68 skipped, 0 finished
[...]

aws cloudcontrol list-resource-requests:

        {
            "TypeName": "AWS::ECR::PublicRepository",
            "Identifier": "jboss-eap",
            "RequestToken": "xxxxxxxx",
            "Operation": "DELETE",
            "OperationStatus": "FAILED",
            "EventTime": "2023-11-17T21:37:11.168000+00:00",
            "StatusMessage": "The repository with name 'jboss-eap' in registry with id 'xxxxxx' cannot be deleted because it still contains images (Service: EcrPublic, Status Code: 400, Request ID: xxxxx)",
            "ErrorCode": "GeneralServiceException"
        },
fridim added a commit to fridim/aws-nuke that referenced this issue Nov 21, 2023
@fridim fridim linked a pull request Nov 21, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant