deploy container registry

This commit is contained in:
Jun-te Kim 2026-02-02 18:40:15 +00:00
parent 1a640d6d01
commit cc76f8502b
2 changed files with 8 additions and 8 deletions

View file

@ -57,8 +57,8 @@ jobs:
cd infrastructure/terraform/shared cd infrastructure/terraform/shared
terraform plan -var-file=dev.tfvars terraform plan -var-file=dev.tfvars
# # only run once # only run once
# - name: Terraform Apply (shared) - name: Terraform Apply (shared)
# run: | run: |
# cd infrastructure/terraform/shared cd infrastructure/terraform/shared
# terraform apply -auto-approve -var-file=dev.tfvars terraform apply -auto-approve -var-file=dev.tfvars

View file

@ -25,14 +25,14 @@ resource "aws_ecr_lifecycle_policy" "my_repository_policy" {
} }
}, },
# 2 Expire everything else beyond the most recent 20 images # 2 Expire everything else beyond the most recent 10 images
{ {
rulePriority = 2 rulePriority = 2
description = "Expire old non-protected images" description = "Retain only the last 10 images" -> "Keep prod, main, dev images forever"
selection = { selection = {
tagStatus = "any" tagStatus = "any"
countType = "imageCountMoreThan" countType = "imageCountMoreThan"
countNumber = 20 countNumber = 10
} }
action = { action = {
type = "expire" type = "expire"