terraform-aws-ecr
terraform-aws-ecr copied to clipboard
Enable lifefycle policy based on "Since imaged pushed"
Have a question? Please checkout our Slack Community or visit our Slack Archive.
Describe the Feature
Unless I missed it, the current rule available for images expiracy is based on the max number of images for a repo (max_image_count). Adding the possibility to use the countType "sinceImagePushed" would obviously extend the capabilities of this module.
Describe Ideal Solution
Have the ability to choose between a lifecycle based on either the total number of images or the number of days since their last push. If both options are set, obviously this should not be allowed.
Alternatives Considered
For the moment I manage the policies outside the module, directly with the resource aws_ecr_lifecycle_policy
which will iterate on the list of images on which I want to apply it.