Migrate ECR to forgejo container registry

This commit is contained in:
Ian Keane 2026-08-22 17:56:03 -04:00
parent bd1c17b09b
commit bbea068e12
7 changed files with 47 additions and 70 deletions

View file

@ -1,33 +0,0 @@
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
}

View file

@ -58,24 +58,3 @@ resource "aws_iam_role_policy" "node_secrets_manager" {
}
# ECR pull access for node (to pull custom images like mcp-auth-proxy)
resource "aws_iam_role_policy" "node_ecr" {
name = "ecr-pull"
role = aws_iam_role.node.id
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Action = [
"ecr:GetDownloadUrlForLayer",
"ecr:BatchGetImage",
"ecr:BatchCheckLayerAvailability",
"ecr:GetAuthorizationToken"
]
Resource = "*"
}
]
})
}