variable "aws_region" {
  default     = "us-east-1"
  description = "Fargate AWS region"
}

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

variable "service_name" {
  default = "swf-itunes"
}

variable "garcon_flow_name" {
  default = "itunes"
}

variable "swf_domain" {
  default = "qa_swf_feed_ingestion"
}


variable "secrets_manager_service_name" {
  default = "iTunes"
}

variable "application_family" {
  default = "data-platform"
}

variable "notification_endpoint" {
  default = "@slack-data-alerts-qa"
}

variable "escalation_notification_endpoints" {
  default = ""
}

variable "additional_tags" {
  default = {
    "map-migrated" = "d-server-032vmw3df2dk6f"
  }
}

variable "bfm_vendor_prop_file" {
  default = "Bfm_Reporter.properties"
}

variable "dkua_vendor_prop_file" {
  default = "Dkua_Reporter.properties"
}

variable "fanclub_vendor_prop_file" {
  default = "Fanclub_Reporter.properties"
}

variable "feed_ingestion_data_bucket" {
  default = "qa-cucumbers"
}

variable "feed_ingestion_table" {
  default = "qa_feed_ingestion_status"
}

variable "finetunes_vendor_prop_file" {
  default = "Finetunes_Reporter.properties"
}

variable "ioda_vendor_prop_file" {
  default = "Ioda_Reporter.properties"
}

variable "logger_dsn" {
  default = "https://qa-fluentd-applications.theorchard.io:8888/application"
}

variable "orchard_vendor_prop_file" {
  default = "Orchard_Reporter.properties"
}

variable "phonofile_vendor_prop_file" {
  default = "Phonofile_Reporter.properties"
}

variable "reporter_jar" {
  default = "/var/app/feed_ingestion/conf/Reporter_2.2.jar"
}

variable "snowflake_account" {
  default = "delphi.us-east-1"
}

variable "snowflake_database" {
  default = "FACTS"
}

variable "snowflake_error_limit" {
  default = "10"
}

variable "snowflake_role" {
  default = "FACTS_DB_QA_SCHEMA_READWRITE"
}

variable "snowflake_schema" {
  default = "QA"
}

variable "snowflake_user" {
  default = "QA_SWF_ITUNES_ETL"
}

variable "snowflake_warehouse" {
  default = "QA_ETL_WAREHOUSE"
}

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

variable "team_name" {
  default = "data-platform"
}

locals {
  # copied from swf-am-streams
  existing_swf_policy_names = [
    "SWF-fullaccess",
    "SNS-${var.environment}-swf-feed-ingestion-Publish",
    "S3-${var.environment}-cucumbers-RW",
    "Dynamo-${var.environment}_feed_ingestion_status-RW",
    "Dynamo-${var.environment}-mobile_metadata-RW",
    "S3-${var.environment}-orcdbucket_feed-drop-RW",
    "SecretsManager-${var.environment}-itunesconnect-token-shared-policy",
    "SES-SendOnly",
    "S3-statement-processing-RW",
    "S3-prod-orcd-ftp-RO",            # only prod exists
    "Athena-prod-sme-temp-db-policy", # only prod exists
  ]

  tags = {
    application_family = var.application_family
    environment        = var.environment
    role               = "service-user"
    terraformed        = true
  }
}
