33 lines
729 B
HCL
33 lines
729 B
HCL
resource "aws_ecr_repository" "dumpnet" {
|
|
name = "dumpnet/mcp-auth-proxy"
|
|
image_tag_mutability = "MUTABLE"
|
|
|
|
image_scanning_configuration {
|
|
scan_on_push = true
|
|
}
|
|
|
|
encryption_configuration {
|
|
encryption_type = "AES256"
|
|
}
|
|
}
|
|
|
|
resource "aws_ecr_lifecycle_policy" "dumpnet" {
|
|
repository = aws_ecr_repository.dumpnet.name
|
|
|
|
policy = jsonencode({
|
|
rules = [{
|
|
rulePriority = 1
|
|
description = "Keep last 5 images per tag prefix"
|
|
selection = {
|
|
tagStatus = "any"
|
|
countType = "imageCountMoreThan"
|
|
countNumber = 5
|
|
}
|
|
action = { type = "expire" }
|
|
}]
|
|
})
|
|
}
|
|
|
|
output "ecr_registry" {
|
|
value = aws_ecr_repository.dumpnet.repository_url
|
|
}
|