Change ECR repository to support not deleting all images when resource is deleted #9911
Labels
enhancement
Requests to existing resources that expand the functionality or scope.
service/ecr
Issues and PRs that pertain to the ecr service.
Milestone
Community Note
Description
Currently, when an aws_ecr_repositiry is deleted, Terraform will get AWS to delete all images within the repo as it deletes the repository as it sets the 'force' parameter to true.
A new parameter should be added to the aws_ecr_repository so that the force parameter can be set to false if the user wants to avoid accidently deleting the repository if it still contains images. This parameter should default to true for backwards compatibility.
I feel that this isn't a safe default to have and should be considered for changed for the 3.x release.
New or Affected Resource(s)
aws_ecr_repository
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: