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 "vpc_id" {
  type        = string
  description = "VPC id where network 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 "is_public" {
  default     = true
  description = "Whether or not container will be created with public IP"
}

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 "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 maintained under ECS service"
}

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 "command" {
  type        = list(string)
  description = "The command that is passed to the container"
  default     = null
}

variable "wait_for_steady_state" {
  type        = bool
  description = "If true, Terraform will wait for the service to reach a steady state before continuing."
  default     = true
}

variable "capacity_provider_strategy" {
  type = map(object({
    base              = number
    weight            = number
    capacity_provider = string
  }))
  description = "Capacity provider strategy to use for the service."
}

variable "retention_in_days" {
  type        = number
  description = "Specifies the number of days you want to retain log events in the specified log group."
  default     = 365
}
