variable "repo_name" {
  type        = string
  description = "The name of the repository"
  default     = "repo_name"
}

variable "common_tags" {
  type        = map(string)
  description = "Common tags to add for the objects"
  default     = {}
}

variable "ro_accounts" {
  type        = list(string)
  description = "List of AWS account IDs which will be allowed to read images from the repository"
  default     = []
}

variable "rw_accounts" {
  type        = list(string)
  description = "List of AWS account IDs which will be allowed to perform rw operations on images from the repository"
  default     = []
}

variable "enable_immutable_tags" {
  type        = bool
  description = "Enables tags immutability for the repository"
  default     = false
}

variable "scan_on_push" {
  type        = bool
  description = "Indicates whether images are scanned after being pushed to the repository (true) or not scanned (false)"
  default     = false
}

variable "lambda" {
  type        = bool
  description = "Indicates whether AWS Lambda has permission to pull from the repository."
  default     = false
}

variable "lifecycle_policy" {
  type        = string
  description = "The policy document. This is a JSON formatted string."
  default     = <<EOF
{
  "rules": [
    {
      "rulePriority": 1,
      "description": "Expire images older than 14 days",
      "selection": {
        "tagStatus": "untagged",
        "countType": "sinceImagePushed",
        "countUnit": "days",
        "countNumber": 14
      },
      "action": {
        "type": "expire"
      }
    }
  ]
}
EOF
}
