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

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

variable "service_name" {
  default = "swf-apple-music-streams"
}

variable "secrets_manager_service_name" {
  default = "apple_music"
}

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

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

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 "finetunes_vendor_prop_file" {
  default = "Finetunes_Reporter.properties"
}

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

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 "sme_vendor_prop_file" {
  default = "Sme_Reporter.properties"
}
variable "feed_ingestion_table" {
  default = "prod_feed_ingestion_status"
}

variable "feed_ingestion_data_bucket" {
  default = "cucumbers"
}

variable "feed_ingestion_drop_bucket" {
  default = "prod-orcdbucket"
}

variable "feed_ingestion_sns_topic" {
  default = "arn:aws:sns:us-east-1:437795906767:prod-swf-feed-ingestion"
}

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

variable "snowflake_database" {
  default = "FACTS"
}

variable "snowflake_schema" {
  default = "PROD"
}

variable "snowflake_warehouse" {
  default = "PROD_ETL_WAREHOUSE"
}

variable "snowflake_user" {
  default = "PROD_SWF_APPLE_MUSIC_ETL"
}

variable "snowflake_role" {
  default = "PROD_SWF_APPLE_MUSIC_ETL_ROLE"
}

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

variable "flow_name" {
  default = "apple_music_streams"
}

# leave for now facts.prod, change it after testing on qa
variable "consumer_db" {
  default = "CONSUMER_REPORTING"
}

variable "consumer_schema" {
  default = "APPLE"
}

locals {
  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
    "SecretsManager-${var.environment}-swf-shared-jenkins-policy"
  ]

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