-
-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for time based rotation #132
Add support for time based rotation #132
Conversation
/terratest |
@uhlajs the tests are failing:
The issue arises from including selection = merge(
{
tagStatus = "any"
countType = (
var.time_based_rotation ?
"sinceImagePushed" :
"imageCountMoreThan"
)
countNumber = var.max_image_count
},
var.time_based_rotation ? { countUnit = "days" } : {}
) I wonder if it makes sense to add an optional rule for time-based expiration instead of modifying an existing one. It can make sense to have both imageCountMoreThan and sinceImagePushed rules simultaneously, depending on the image management strategy. Also, could you please add a fix to satisfy another failing check:
|
@gberenice Thank you for quick response.
Agree, actually my colleague suggested same extension. I have modified the original PR so that both
Fixed. Additionally, I have fixed linting. |
It seems that AWS ECR doesn't support having multiple lifecycle policy validation:
|
/terratest |
Reverted to original design. |
/terratest |
@uhlajs thanks for trying out the second approach - good to know what options we have 👍
|
/terratest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uhlajs LGTM 👍
These changes were released in v0.41.1. |
what
Add support for countType "sinceImagePushed" ECR Lifepolicy rule.
why
references