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 "task_family" {
  type        = string
  description = "Name of the task definition family"
}

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 "secrets" {
  type        = string
  description = "Massive of secrets as a JSON. Will be directly inserted into json definition of a container"
  default     = "[]"
}

variable "port_mapping_enabled" {
  type        = bool
  description = "Enables port mapping configuration"
  default     = false
}
variable "container_port" {
  type        = number
  default     = 8080
  description = "Port which container exposes, if port mapping is enabled"
}

variable "dd_api_key_secret" {
  type        = string
  description = "ARN of secret which contains datadog api key"
}

variable "dd_docker_image" {
  type        = string
  description = "Datadog agent image"
  default     = "public.ecr.aws/datadog/agent:latest"
}

variable "dd_log_group_name" {
  type        = string
  description = "Log group of datadog agent"
}

variable "env_vars" {
  type        = list(map(string))
  description = "List of env_vars as map of string. Will be merged with default values and converted into json."
  default     = []
}

variable "dd_env_vars" {
  type        = list(map(string))
  description = "List of env_vars as map of string. Will be merged with default values and converted into json."
  default     = []
}

variable "dd_apm_enabled" {
  type        = string
  description = "Datadog container DD_APM_ENABLED variable"
  default     = "true"
}

variable "dd_logs_injection" {
  type        = string
  description = "Enable connecting logs and traces Injection."
  default     = "false"
}

variable "containers_template" {
  default     = "template_with_dd.tmpl"
  description = "Name of the container template file, module will check this filename in module own folder."
}

variable "cw_log_group_name" {
  type        = string
  description = "The name of CloudWatch log group."
  default     = ""
}
