Skip to content

Commit

Permalink
add testnet-prod lcp
Browse files Browse the repository at this point in the history
  • Loading branch information
carlomazzaferro committed Oct 10, 2023
1 parent cecf279 commit a85d1c9
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions ops/modules/ecr/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,19 @@ resource "aws_ecr_lifecycle_policy" "remove_old_images" {
},
{
"rulePriority": 3,
"description": "Expire testnet-prod images that are not the last 10",
"selection": {
"tagStatus": "tagged",
"tagPrefixList": ["testnet-prod-"],
"countType": "imageCountMoreThan",
"countNumber": 10
},
"action": {
"type": "expire"
}
},
{
"rulePriority": 4,
"description": "Expire prod images that are not the last 5",
"selection": {
"tagStatus": "tagged",
Expand All @@ -50,11 +63,11 @@ resource "aws_ecr_lifecycle_policy" "remove_old_images" {
}
},
{
"rulePriority": 4,
"rulePriority": 6,
"description": "Expire images older than 60 days",
"selection": {
"tagStatus": "tagged",
"tagPrefixList": ["main-", "staging-", "prod-"],
"tagPrefixList": ["main-", "staging-", "testnet-prod", "prod-"],
"countType": "sinceImagePushed",
"countUnit": "days",
"countNumber": 180
Expand Down

0 comments on commit a85d1c9

Please sign in to comment.