使用 CloudFormation 删除包含带有图像的 ECR 的堆栈会导致失败消息:
The repository with name 'my-repo' in registry with id '123' cannot be deleted because it still contains images
Run Code Online (Sandbox Code Playgroud)
CLI 提供了一种通过使用--force
标志来覆盖它的方法:
aws ecr delete-repository --repository-name my-repo --force
Run Code Online (Sandbox Code Playgroud)
如何仅使用 CloudFormation 获得相同的结果?