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"
}
/* Short name  could be used if we encounter aws character limits in target groups names
variable short_name {
  type        = string
  default     = ""
  description = "Short name in case we exceeded"
}*/

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

variable "protocol" {
  type        = string
  description = "The supported protocols are TCP UDP TLS"
  default     = "TCP"
}

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 "nlb_arn" {
  type        = string
  description = "ARN of Network Load Balancer to attach listner to"
}

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 "fqdn" {
  type        = string
  description = "FQDN which will be listened by ECS Service"
}

variable "task_count" {
  type        = number
  description = "Amount of tasks running that will be maintained under ECS service"
}

variable "container_port" {
  type        = number
  description = "Port which container exposes"
}

variable "tg_port" {
  type        = number
  description = "Port of the target group. Generally it should not be changed."
}

variable "tg_deregistration_delay" {
  default     = 60
  description = "The amount time for Load Balancing to wait before changing the state of a deregistering target from draining to unused. The range is 0-3600 seconds."
}

variable "route53_zone_id" {
  type        = string
  default     = ""
  description = "ID of the DNS hosted zone in Route 53. If set, dns record will be created."
}

variable "nlb_dns_name" {
  type        = string
  default     = ""
  description = "DNS name of NLB. Required if route53_zone_id is set"
}

variable "nlb_zone_id" {
  type        = string
  default     = ""
  description = "DNS zone id of ALB. Required if route53_zone_id is set"
}

variable "route53_eval_health" {
  default     = false
  description = "Allow route53 to evaluate health of the targets behind it."
}

variable "task_definition_arn" {
  type        = string
  description = "The family and revision (family:revision) or full ARN of the task definition that you want to run in your service."
}

variable "enable_ecs_managed_tags" {
  default     = false
  description = "Specifies whether to enable Amazon ECS managed tags for the tasks within the service."
}

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
}
