You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After successfully building a Docker image and ECR repository using module 'docker-build' running terraform destroy returns:
2022-07-19T11:39:03.434+0200 [DEBUG] [aws-sdk-go] {}
╷
│ Error: ECR Repository (myimage) not empty, consider using force_delete: RepositoryNotEmptyException: The repository with name 'myimage' in registry with id 'XXXXXXXXXXXX' cannot be deleted because it still contains images
│
│
╵
The default-value of keep_remotely is false so it should be deleted. Additionally it seems to delete image resource and repository in parallel. But even after extending resource "docker_registry_image" "this" by depends_on = [ aws_ecr_repository.this ] it did work although now they were not deleted in parallel.
✋ I have searched the open/closed issues and my issue is not listed.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Description
After successfully building a Docker image and ECR repository using module 'docker-build' running
terraform destroy
returns:The default-value of keep_remotely is false so it should be deleted. Additionally it seems to delete image resource and repository in parallel. But even after extending resource "docker_registry_image" "this" by
depends_on = [ aws_ecr_repository.this ]
it did work although now they were not deleted in parallel.Versions
Reproduction Code [Required]
Steps to reproduce the behavior:
terraform apply
terraform destroy
Expected behavior
No errors on
terraform destroy
and all resources are removed.Actual behavior
Running
terraform destroy
aborts. One needs to remove the image manually and do another attempt ofterraform destroy
.Additional context
This is the output of plan:
The text was updated successfully, but these errors were encountered: