Remove decorative icons and update CORS configuration
This commit is contained in:
34
terraform/ecr.tf
Normal file
34
terraform/ecr.tf
Normal file
@@ -0,0 +1,34 @@
|
||||
# ECR Repository for API
|
||||
resource "aws_ecr_repository" "api" {
|
||||
name = "${var.app_name}-api"
|
||||
image_tag_mutability = "MUTABLE"
|
||||
|
||||
image_scanning_configuration {
|
||||
scan_on_push = true
|
||||
}
|
||||
|
||||
tags = {
|
||||
Name = "${var.app_name}-api"
|
||||
}
|
||||
}
|
||||
|
||||
# ECR Lifecycle Policy
|
||||
resource "aws_ecr_lifecycle_policy" "api" {
|
||||
repository = aws_ecr_repository.api.name
|
||||
|
||||
policy = jsonencode({
|
||||
rules = [{
|
||||
rulePriority = 1
|
||||
description = "Keep last 10 images"
|
||||
selection = {
|
||||
tagStatus = "tagged"
|
||||
tagPrefixList = ["v"]
|
||||
countType = "imageCountMoreThan"
|
||||
countNumber = 10
|
||||
}
|
||||
action = {
|
||||
type = "expire"
|
||||
}
|
||||
}]
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user