variable "region" {
  default = "us-east-1"
}

variable "environment" {
  default = "prod"
}

variable "service_name" {
  default = "graphql-product"
}

variable "apollo_engine_api_key" {
  default = ""
}

variable "sentry_dsn" {
  default = ""
}

variable "logger_dsn" {
  default = ""
}

variable "cache_use_redis" {
  default = "false"
}

variable "cache_redis_host" {
  default = ""
}

variable "playground" {
  default = "0"
}

variable "tracing" {
  default = "0"
}

variable "cors" {
  default = "1"
}

variable "debug" {
  default = "0"
}

variable "task_memory" {
  default = 8192
}

variable "datadog_memory" {
  default = 256
}

variable "fluentbit_memory" {
  default = 64
}

variable "introspection" {
  default = "0"
}

variable "application_family" {
  default = "product-builder"
}

variable "team" {
  description = "Datadog team slug"
  default     = "content-creation-management"
}

variable "notification_endpoints" {
  description = "Endpoints for alerts. Can be email, slack, pagerduty, etc"
  type        = string
  default     = "@slack-The_Orchard-content-creation-mgmt-alerts"
}

variable "escalation_notification_endpoints" {
  description = "Endpoints for escalation alerts. Can be email, slack, pagerduty, etc"
  type        = string
  default     = "@slack-The_Orchard-content-creation-mgmt-alerts @oncall-content-creation-management"
}

variable "critical_number_5xx" {
  description = "Number of 5xx requests (per 5m) for critical alerts"
  default     = 12
}

variable "critical_recovery_number_5xx" {
  description = "Number of 5xx requests (per 5m) for critical recovery"
  default     = 8
}

variable "warning_number_5xx" {
  description = "Number of 5xx requests (per 5m) for warnings"
  default     = 8
}

variable "warning_recovery_number_5xx" {
  description = "Number of 5xx requests (per 5m) for warning recovery"
  default     = 6
}

# Scaling settings
variable "scale_up_cooldown_period" {
  default = 30
}

variable "scale_up_adjustment" {
  default = "2"
}

variable "scale_down_cooldown_period" {
  default = 300
}

variable "scale_down_adjustment" {
  default = "-1"
}

variable "secrets_manager_secret_names" {
  description = "List of secrets manager secrets to create"
  type        = list(string)
  default = [
    "SPLIT_API_KEY",
    "CONTENT_OPENSEARCH_PASSWORD",
  ]
}

variable "dependent_applications" {
  description = "List of dependent applications"
  type        = list(string)
  default     = ["all-orchard-suite"]
}

variable "content_opensearch_url" {
  description = "URL endpoint for the content-search OpenSearch cluster"
  default     = "https://vpc-prod-content-search-lmjhmaqj2z46g67jzl2d6wjkfu.us-east-1.es.amazonaws.com/"
}
variable "content_opensearch_username" {
  description = "Username for graphql-product service to authenticate with content-search OpenSearch"
  default     = "gql_product_user"
}

variable "kdh_application_family" {
  description = "Temporary KDH application family for secrets editing access"
  type        = string
  default     = "kafka-data-highway"
}
