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

aws.ecr.Repository with emptyOnDelete=true does not empty the repository on delete #1270

Open
rgl opened this issue Jan 14, 2024 · 3 comments
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec

Comments

@rgl
Copy link

rgl commented Jan 14, 2024

What happened?

While trying to delete a ECR repository that still has content/images it failed with:

error: operation DELETE failed with "GeneralServiceException": The repository with name 'pulumi-typescript-aws-native-ecr-example/example-4b5b730' in registry with id '0000' cannot be deleted because it still contains images (Service: Ecr, Status Code: 400, Request ID: 00000000-0000-0000-0000-000000000000)

PS this works fine with the classic provider (e.g. at https://github.com/rgl/pulumi-typescript-aws-classic-ecr-example).

Example

        const repository = new aws.ecr.Repository(`${project}/${name}`, {
            emptyOnDelete: true,
            imageTagMutability: "IMMUTABLE",
            imageScanningConfiguration: {
                scanOnPush: false,
            },
            tags: getMergedDefaultTagsArg(tags),
        });

PS The full example is at https://github.com/rgl/pulumi-typescript-aws-native-ecr-example.

Output of pulumi about

CLI          
Version      3.101.1
Go Version   go1.21.5
Go Compiler  gc

Plugins
NAME        VERSION
aws-native  0.93.0
command     0.9.2
nodejs      unknown

Host     
OS       ubuntu
Version  22.04
Arch     x86_64

This project is written in nodejs: executable='/usr/bin/node' version='v20.11.0'

Current Stack: organization/pulumi-typescript-aws-native-ecr-example/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend        
Name           dm1.lan
URL            file:///home/vagrant/Projects/pulumi-typescript-aws-native-ecr-example
User           vagrant
Organizations  
Token type     personal

Dependencies:
NAME                VERSION
@pulumi/pulumi      3.101.1
@types/node         20.11.0
@pulumi/aws-native  0.93.0
@pulumi/command     0.9.2

Pulumi locates its logs in /tmp by default

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

@rgl rgl added kind/bug Some behavior is incorrect or out of spec needs-triage Needs attention from the triage team labels Jan 14, 2024
@mjeffryes mjeffryes added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). and removed needs-triage Needs attention from the triage team labels Jan 17, 2024
@jbdelhommeau
Copy link

I have the same problem ! Do you have any update regarding this issue ?

@rgl
Copy link
Author

rgl commented May 17, 2024

I'm afraid this is still happening with the latest pulumi, which I'm now using at rgl/pulumi-typescript-aws-native-ecr-example@fd3064d:

CLI          
Version      3.116.1
Go Version   go1.22.2
Go Compiler  gc

Plugins
KIND      NAME        VERSION
resource  aws-native  0.105.0
resource  command     0.11.0
language  nodejs      unknown

Host     
OS       ubuntu
Version  22.04
Arch     x86_64

This project is written in nodejs: executable='/usr/bin/node' version='v20.13.1'

Current Stack: organization/pulumi-typescript-aws-native-ecr-example/dev

Found no resources associated with dev

Found no pending operations associated with dev

Backend        
Name           dm1.lan
URL            file:///home/vagrant/Projects/pulumi-typescript-aws-native-ecr-example
User           vagrant
Organizations  
Token type     personal

Dependencies:
NAME                VERSION
@pulumi/aws-native  0.105.0
@pulumi/command     0.11.0
@pulumi/pulumi      3.116.1
@types/node         20.12.12

Pulumi locates its logs in /tmp by default

@corymhall
Copy link
Contributor

I just created an issue with CloudFormation on this. Lets see what they say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

4 participants