From 1e6b92885eab878123cd20105c79ad389bcb8ed7 Mon Sep 17 00:00:00 2001 From: Vlad Hrybok Date: Wed, 13 Nov 2019 19:51:22 -0500 Subject: [PATCH] #22 Reverted ECR repo policy back to default, as an attempt to destroy a non-empty ECR repo lead to Cfn stack deletion failure, resulting in even more manual cleanup required, compared to just manually deleting the ECR repo after "cdk destroy". --- infra-as-code/CicdInfraAsCode/src/CicdInfraAsCodeStack.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra-as-code/CicdInfraAsCode/src/CicdInfraAsCodeStack.cs b/infra-as-code/CicdInfraAsCode/src/CicdInfraAsCodeStack.cs index ee30924..32336de 100644 --- a/infra-as-code/CicdInfraAsCode/src/CicdInfraAsCodeStack.cs +++ b/infra-as-code/CicdInfraAsCode/src/CicdInfraAsCodeStack.cs @@ -206,7 +206,7 @@ private Repository CreateDockerImageRepo() return new Repository(this, "DockerImageRepository", new RepositoryProps { RepositoryName = this.settings.DockerImageRepository, - RemovalPolicy = RemovalPolicy.DESTROY, + // RemovalPolicy = RemovalPolicy.DESTROY, // Destroy can only destroy empty repos. Ones with images will cause stack deletion to fail, requiring more manual cleanup. LifecycleRules = new [] { new LifecycleRule