add auto delete policy

This commit is contained in:
Jun-te Kim 2025-07-18 16:38:36 +00:00
parent a9377a3ae1
commit a77c981d8a
2 changed files with 9 additions and 10 deletions

View file

@ -35,11 +35,10 @@ resource "aws_ecr_lifecycle_policy" "extractor_loader_lifecycle" {
rulePriority = 1
description = "Delete tagged images older than 14 days"
selection = {
tagStatus = "tagged"
countType = "sinceImagePushed"
countUnit = "days"
countNumber = 5
tagPrefixList = [""] # Matches all tagged images
tagStatus = "tagged"
countType = "sinceImagePushed"
countUnit = "days"
countNumber = 5
}
action = {
type = "expire"

View file

@ -34,11 +34,11 @@ resource "aws_ecr_lifecycle_policy" "extractor_loader_lifecycle" {
rulePriority = 1
description = "Delete tagged images older than 14 days"
selection = {
tagStatus = "tagged"
countType = "sinceImagePushed"
countUnit = "days"
countNumber = 14
tagPrefixList = [""] # Matches all tagged images
tagStatus = "tagged"
countType = "sinceImagePushed"
countUnit = "days"
countNumber = 5
# Removed tagPrefixList
}
action = {
type = "expire"