copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

Configure ECR lifecycle policy via Copilot

Open sirbully opened this issue 4 years ago • 10 comments

Is there any way we can configure the lifecycle policy for the automatically generated ECR? I don't know if I missed it in the docs or if I should be doing it manually from the AWS console instead

sirbully avatar Jan 14 '21 12:01 sirbully

Hi @sirbully, thanks for the issue! We don't have a way of updating the ECR settings in Copilot at the moment 🙇. This would be a new feature request for us.

efekarakus avatar Jan 14 '21 17:01 efekarakus

Hi @efekarakus just came across this now. Is there a way to use an add-on to achieve this?

afgallo avatar Apr 21 '22 12:04 afgallo

Hi @afgallo !

Unfortunately not at the moment, today the modification of "app" stacks is a bit difficult. If you'd like your ECR repositories to follow a certain ECR lifecycle policy, there are two possible ways:

  1. Update the repos with the AWS CLI or with the console
  2. Alternatively, you can update Copilot's stackset's template: stackset So that the ECR repos have a lifecycle policy.

Hope this helps! We're actively working on the "environment manifest" today where we're going to allow modification of the environment stack resources, after that we'll explore the "application manifest" as an issue!

efekarakus avatar Apr 21 '22 16:04 efekarakus

Is application manifest work already in progress? I could try to contribute, especially for ecr lifecycle policies. What I am doing right now is importing copilot-managed repos to Terraform, and then managing lifecycle policies with Terraform

Fodoj avatar Jul 10 '22 17:07 Fodoj

Hi @Fodoj! We haven't yet begun work on app manifests; we're just finishing up env manifests (https://github.com/aws/copilot-cli/issues/3522). We always welcome contributions; please follow the guidelines here. Thanks so much!

huanjani avatar Jul 11 '22 21:07 huanjani

Hi, any progress on this so far? I cannot find any information about ECR Lifecycle policies on the Copilot docs.

dumim avatar Aug 29 '23 02:08 dumim

Hi, any progress on this so far ?

akshat-pyor avatar Dec 22 '23 10:12 akshat-pyor