variable "application_family" {
  default = "assets"
}

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

variable "aws_region" {
  default     = "us-east-1"
  description = "All elements of the state machine execution flow have to be placed in the same region."
}

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

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

variable "secrets_manager_secret_names" {
  description = "List of secrets manager secrets to create"
  type        = list(string)
  default = [
    "WOWZA_SHARED_SECRET_V2",
    "AUTOMATION_QA_DB_PASS",
    "AUTOMATION_DB_CLIENT_PASS",
    "RDS_DB_PASS",
    "AR_DB_PASS",
  ]
}

variable "MANAGE_ASSET_URL" {
  default = "http://qarbenc01.qaorch.com"
}

variable "REDIS_PORT" {
  default = 6379
}

variable "SENTRY_DSN" {
  default = "https://f5e4e528d09144cf881ab860d123d53e:3bd5256daff440e9b6227badd6ea193a@sentry.io/128551"

}

variable "SERVER_LOCATION_AVL" {
  default = 7
}

variable "STREAM_URL" {
  default = "rtmp://streams.qaorch.com/vod"
}

variable "STS_TOKEN_DURATION" {
  default = 3600
}

variable "WOWZA_PATH_PREFIX_V2" {
  default = "vods3"
}

variable "WOWZA_URL" {
  default = "https://wowza.qaorch.com"
}

variable "WOWZA_PATH_PREFIX" {
  default = "vod_edge"
}

variable "WOWZA_URL_V2" {
  default = "https://qa-aws-wowza.qaorch.com"
}

variable "UWSGI_WORKERS" {
  default = "8"
}

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

locals {
  pre_existing_policy_names = [
    "S3-${var.environment}-asset-storage-RW",
    "S3-${var.environment}-orcd-raw-assets-Delete",
    "S3-${var.environment}-asset-storage-images-RO",
    "S3-${var.environment}-orcd-raw-assets-load_testing_assets-RW",
    "STS-${var.environment}-${var.service_name}-AssumeRole",
    "S3-${var.environment}-asset-storage_images_vendor_and_artist-RW",
    "S3-${var.environment}-orcd-mezzanine-assets-RW",
    "S3-${var.environment}-orcd-raw-assets-Read-Get"
  ]

  tags = {
    terraformed        = true
    environment        = var.environment
    service_name       = var.service_name
    application_family = var.application_family
  }
}

variable "notification_endpoints" {
  default = "@slack-content-delivery-and-asset-mgmt-qa-alerts"
}

variable "escalation_notification_endpoints" {
  default = "@slack-content-delivery-and-asset-mgmt-qa-alerts"
}

variable "rds_db_user" {
  description = "ows-assets RDS db user name"
  default = "ows-assets"
}

variable "rds_db_connection_charset" {
  description = "ows-assets RDS db connection character set"
  default = "utf8mb4"
}

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

variable "ar_db_name" {
  description = "qa art_relations db name"
  default = "art_relations"
}

variable "ar_db_user" {
  description = "ows-assets art_relations db user name"
  default = "ows-assets"
}

variable "ar_db_connection_charset" {
  description = "ows-assets art_relations db connection character set"
  default = "utf8mb4"
}

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