variable "service_name" {
  description = "Name of the ECS Task and container that will be created for this service"
  type        = string
}

variable "target_cluster_arn" {
  description = "Target cluster to deploy this service"
  type        = string
}

variable "service_role_arn" {
  description = "Role ARN that this service will assume to grant access to resources"
  type        = string
}

variable "env" {
  description = "Environment name"
  type        = string
}

variable "container_image" {
  description = "Docker image to deploy"
  type        = string
}

variable "cpu" {
  description = "CPU to assign to this node, including main container and sidecars"
  type        = number
}

variable "memory" {
  description = "Memory to assign to this node, including main container and sidecars"
  type        = number
}

variable "fargate_weight" {
  description = "Weight of non-spot Fargate tasks in the fleet"
  type        = number
}

variable "fargate_spot_weight" {
  description = "Weight of spot Fargate tasks in the fleet"
  type        = number
}

variable "desired_count" {
  description = "Number of desired tasks (ECS nodes) for the service"
  type        = number
  default     = 1
}

variable "ephemeral_storage_gib" {
  description = "Ephemeral storage in GiB (min 21, max 200). Needed for git clone workdir."
  type        = number
  default     = 30
}

variable "env_vars" {
  description = "Environment variables to attach to this service. Each key is the variable name, value is the variable value."
  type        = map(string)
}

variable "secrets" {
  description = "Secrets to attach to this service. Each key is the variable name, value is the AWS secret ARN."
  type        = map(string)
}

variable "vpc_id" {
  description = "VPC of the AWS account"
  type        = string
}

variable "dd_source" {
  description = "Language to show in Datadog as source"
  type        = string
}

variable "container_port" {
  description = "Internal port used by the application"
  type        = number
}

variable "target_group_arn" {
  description = "ARN of the target group to register the service with"
  type        = string
  default     = ""
}

variable "health_check_path" {
  description = "HTTP endpoint path to check for service health"
  type        = string
  default     = "/health"
}

variable "stop_timeout" {
  description = "Seconds ECS waits after SIGTERM before SIGKILL. Must cover the bot's drain grace window."
  type        = number
  default     = 120
}
