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

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

variable "read_capacity" {
  default     = "10"
  description = "Read capacity required by AWS for provisioning."
}

variable "hash_key" {
  default     = "first_id"
  description = "Hash key required by AWS for indexing."
}

variable "range_key" {
  default     = "second_id"
  description = "Range key required by AWS for secondary indexing."
}

variable "range_type" {
  default     = "S"
  description = "Type of range key."
}

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

variable "SENTRY_DSN" {
  default = ""
}

variable "LOGGER_DSN" {
  default = ""
}

variable "LOGGER_LEVEL" {
  default = "ERROR"
}

variable "REDIS_URL" {
  default = ""
}

variable "REDIS_CACHE_TTL" {
  description = "TTL in seconds"
  default     = 300
}

variable "DATADOG_ENV" {
  default = "qa-ows-analytics"
}

variable "DD_APM_ANALYZED_SPANS" {
  default = "flask|flask.request=1,requests|requests.request=1"
}

variable "SPLITIO_ENABLED" {
  default = ""
}

variable "attributes" {
  type = list(object({
    name = string
    type = string
    }
  ))
  description = "List of additional attributes"
  default = [
    {
      name = "first_id"
      type = "S"
    },
    {
      name = "second_id"
      type = "S"
    }
  ]
}

variable "secondary_indices" {
  type = list(object({
    name            = string
    hash_key        = string
    range_key       = string
    projection_type = string
    read_capacity   = string
    write_capacity  = string
    }
  ))
  description = "List of global global_secondary_index"
  default = [
    {
      name            = "second_id-first_id"
      hash_key        = "second_id"
      range_key       = "first_id"
      projection_type = "ALL"
      read_capacity   = "1"
      write_capacity  = "1"
    }
  ]
}

variable "route53_zone_id" {
  default     = "Z2RSKZ9M7TJ9Z"
  description = "The R53 Zone ID for theorchard.io"
}

variable "route53_record_ttl" {
  default     = "60"
  description = "One minute default to allow timely updates"
}

variable "application_family" {
  default = "insights"
}

variable "team_name" {
  type    = string
  default = "insights"
}

variable "snowflake_ows_podcast_db_schema" {
  default     = "ORCHARD_APP_REPORTING_V2.QA_OWS_PODCAST_OWS_PODCAST."
  description = "Concatenated db and schema name of backup ows-podcast tables in snowflake"
}

variable "notification_endpoints" {
  default = "@slack-graphql"
}

variable "splitio_preforked" {
  default = "false"
}

variable "secrets_manager_legacy_secret_names" {
  description = "List of secrets manager secrets to create"
  type        = list(string)
  default = [
    "APPLE_MUSIC_KEY_ID",
    "APPLE_MUSIC_PRIVATE_KEY_PATH",
    "APPLE_MUSIC_PRIVATE_KEY",
    "APPLE_MUSIC_TEAM_ID",
    "REDIS_HOST",
    "REDIS_PORT",
    "SNOWFLAKE_ACCOUNT",
    "SNOWFLAKE_DATABASE",
    "SNOWFLAKE_PASSWORD",
    "SNOWFLAKE_ROLE",
    "SNOWFLAKE_SCHEMA",
    "SNOWFLAKE_USER",
    "SNOWFLAKE_WAREHOUSE",
    "SPOTIFY_CLIENT_ID",
    "SPOTIFY_SECRET_ID",
    "SENTRY_DSN",
    "SNOWFLAKE_PRIVATE_KEY",
  ]
}

variable "secrets_manager_secret_names" {
  description = "List of secrets manager secrets to create"
  type        = list(string)
  default = [
    "SENTRY_DSN",
    "SNOWFLAKE_ROLE",
    "SNOWFLAKE_USER",
    "SNOWFLAKE_SCHEMA",
    "SNOWFLAKE_PASSWORD",
    "REDIS_PORT",
    "SNOWFLAKE_ACCOUNT",
    "SNOWFLAKE_WAREHOUSE",
    "REDIS_HOST",
    "SNOWFLAKE_DATABASE",
    "SNOWFLAKE_APOLLO_DATABASE",
    "SNOWFLAKE_APOLLO_SCHEMA",
    "SNOWFLAKE_PRIVATE_KEY",
  ]
}
