variable "env_prefix" {
  type        = string
  description = "Prefix of the environment, lowercased"
}

variable "project_group" {
  type        = string
  description = "Project group name, lowercased"
}

variable "project" {
  type        = string
  description = "Project name, lowercased"
}

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

variable "region" {
  type        = string
  default     = "us-east-1"
  description = "Region where resources will be created"
}

variable "cluster_arn" {
  type        = string
  description = "ARN of ECS cluster of the environment"
}

variable "subnets" {
  type        = list(string)
  description = "List of subnets which ECS Service will use"
}

variable "security_groups" {
  type        = list(string)
  description = "List of security groups which will be applied to ECS Service"
}

variable "task_role_arn" {
  type        = string
  description = "ARN of the role which will be assigned to executing tasks"
}

variable "task_exec_role_arn" {
  type        = string
  description = "ARN of the role under which will be used to run the tasks"
}

variable "scheduler_role_arn" {
  type        = string
  description = "ARN of the role under which will be used to shedulerun"
}

variable "image" {
  type        = string
  description = "ECR image which will be used for created task"
}

variable "cpu" {
  type        = number
  description = "CPU units limit"
}

variable "memory" {
  type        = number
  description = "Memory limit (in megabytes)"
}

variable "task_count" {
  type        = number
  description = "Amount of tasks running that will be executed on a single run"
  default     = 1
}

variable "secrets" {
  type = list(object({
    name      = string
    valueFrom = string
  }))
  description = "The secrets to pass to the container. This is a list of maps"
  default     = null
}

variable "env_vars" {
  type = list(object({
    name  = string
    value = string
  }))
  description = "The environment variables to pass to the container. This is a list of maps"
  default     = []
}

variable "schedule_expression" {
  type        = map(object({ expression = string, enabled = bool }))
  description = "A map of schedule expressions"
}

variable "command" {
  type        = list(string)
  description = "The command that is passed to the container"
  default     = null
}
