variable "name_prefix" {
  type        = string
  description = "The prefix name of the objects"
  default     = "name_prefix"
}

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

variable "tg_name" {
  type        = string
  description = "The name of the target group."
}

variable "tg_port" {
  default     = 80
  description = "The port the load balancer uses when routing traffic to targets in this target group (1-65535)."
}

variable "tg_protocol" {
  default     = "HTTP"
  description = "The protocol the load balancer uses when routing traffic to targets in this target group."
}

variable "tg_vpc_id" {
  type        = string
  description = "The identifier of the virtual private cloud (VPC) for the target group. The targets you register with this target group must use this VPC."
}

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 "tg_health_check_path" {
  type        = string
  default     = "/"
  description = "The destination path for health checks. This path must begin with a '/' character, and can be at most 1024 characters in length."
}

variable "tg_health_check_port" {
  type        = string
  default     = "traffic-port"
  description = "The port the load balancer uses when performing health checks on targets. The default is the port on which each target receives traffic from the load balancer, but you can specify a different port (1-65535)."
}

variable "tg_health_check_protocol" {
  type        = string
  default     = "HTTP"
  description = "The protocol the load balancer uses when performing health checks on targets in this target group."
}

variable "tg_health_check_matcher" {
  type        = string
  default     = "200-204"
  description = "The HTTP codes to use when checking for a successful response from a target. You can specify multiple values (for example, \"200,202\") or a range of values (for example, \"200-299\")."
}

variable "tg_health_check_interval" {
  type        = number
  description = "Approximate amount of time, in seconds, between health checks of an individual target. "
  default     = 30
}

variable "tg_health_check_timeout" {
  type        = number
  description = "Amount of time, in seconds, during which no response means a failed health check. "
  default     = 10
}

variable "tg_health_check_unhealthy_threshold" {
  type        = number
  description = "Number of consecutive health check failures required before considering the target unhealthy."
  default     = 3
}

variable "tg_health_check_healthy_threshold" {
  type        = number
  description = "Number of consecutive health checks successes required before considering an unhealthy target healthy."
  default     = 3
}

variable "tg_target_type" {
  type        = string
  default     = "instance"
  description = "The type of the targets. Valid types instance, ip"
}

variable "tg_targets" {
  type        = list(string)
  default     = []
  description = "The list of the targets."
}

