# ECR repositories for Lambdas.
resource "aws_ecr_repository" "elevate_permissions_lambda_repository" {
  name                 = "lambda-${local.elevate_permissions_lambda_name}"
  image_tag_mutability = "MUTABLE"

  encryption_configuration {
    encryption_type = "KMS"
  }

  image_scanning_configuration {
    scan_on_push = true
  }

  tags = local.tags
}

resource "aws_ecr_repository" "cleanup_lambda_repository" {
  name                 = "lambda-${local.cleanup_lambda_name}"
  image_tag_mutability = "MUTABLE"

  encryption_configuration {
    encryption_type = "KMS"
  }

  image_scanning_configuration {
    scan_on_push = true
  }

  tags = local.tags
}
