diff --git a/terraform/stacks/ecr/stack.tf b/terraform/stacks/ecr/stack.tf index 465e26fe..b03bc1e1 100644 --- a/terraform/stacks/ecr/stack.tf +++ b/terraform/stacks/ecr/stack.tf @@ -71,3 +71,29 @@ resource "aws_ecr_repository" "repository" { tags = {} tags_all = {} } + +resource "aws_ecr_lifecycle_policy" "ecr_repository_lifecycle_policy" { + for_each = var.repositories + + repository = each.key + + policy = <