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

variable "environment" {
  description = "Available values are: qa, dev, prod"
  default     = "qa"
}

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

variable "team_name" {
  type        = string
  description = "Name of team that owns the service"
  default     = "content-delivery-asset-management"
}

variable "service_name" {
  default = "ows-video"
}

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

variable "escalation_notification_endpoints" {
  description = "Endpoints for escalation alerts. Can be email, slack, pagerduty, etc"
  type        = string
  default     = "@slack-content-delivery-and-asset-mgmt-qa-alerts"
}

variable "video_assets_bucket_name" {
  description = "Bucket name for all video assets: mezzanine, previews and thumbnails (minus environment prefix)."
  default     = "orcd-video-assets"
}

# art_relations DB config
variable "AR_DB_NAME" {
  description = "art_relations db schema name"
  default     = "art_relations"
}

variable "AR_DB_USER" {
  description = "art_relations db user"
  default     = "ows-video"
}

variable "AR_DB_HOST" {
  description = "art_relations db host"
  default     = "qa.db.qaorch.com"
}

# direct_delivery db config
variable "DD_DB_HOST" {
  description = "direct_delivery db host"
  default     = "qadddb.qaorch.com"
}

variable "DD_DB_USER" {
  description = "direct_delivery db user"
  default     = "ows-video"
}

variable "DD_DB_NAME" {
  description = "direct_delivery db schema name"
  default     = "direct_delivery"
}

# ows-video rds config
variable "VIDEO_DB_HOST" {
  description = "ows-video db host"
  default     = "qa-ows-video.cluster-cb22xqmk0y0q.us-east-1.rds.amazonaws.com"
}

variable "VIDEO_DB_USER" {
  description = "ows-video db user"
  default     = "ows-video"
}

variable "VIDEO_DB_NAME" {
  description = "ows-video db schema name"
  default     = "ows_video"
}

variable "video_ingestion_workflow_state_machine_name" {
  description = "Name of video_ingestion_workflow state machine."
  default     = "video_ingestion_workflow"
}

variable "video_approval_workflow_state_machine_name" {
  description = "Name of video_approval_workflow state machine."
  default     = "video_approval_workflow"
}

variable "video_ingestion_reencode_workflow_state_machine_name" {
  description = "Name of video_ingestion_reencode_workflow state machine."
  default     = "video_ingestion_reencode_workflow"
}

variable "secret_names" {
  type = list(string)
  default = [
    "ar_db_password",
    "ows_video_password",
    "CLOUDFRONT_KEY_PAIR_ID",
    "CLOUDFRONT_PRIVATE_KEY",
    "WOWZA_SHARED_SECRET",
    "AWS_ACCESS_KEY_ID",
    "AWS_SECRET_ACCESS_KEY",
    "rds_master_username", // for RDS
    "rds_master_password", // for RDS
  ]
}

variable "vpc_name" {
  description = "VPC name to deploy resources."
  type        = string
  default     = "prod"
}

variable "UWSGI_WORKERS" {
  default = "30"
}

variable "UWSGI_CHEAPER_RSS_LIMIT_SOFT_GB" {
  description = "Memory high-level to stop creating workers, in gigabytes"
  default     = 1.5
}

variable "CCM_VPB_COMPOSER_REQUIRED" {
  description = "Feature flag: when true, requires the Composer field to be filled in for video uploads."
  type        = bool
  default     = true
}

locals {
  downstream_services = [
    "ows-delivery-metadata",
  ]
}
