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

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

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

variable "notification_endpoint" {
  default = "@slack-data-platform-team-private"
}


# https://github.com/theorchard/swf-feed-ingestion/blob/master/feed_ingestion/util/log_status.py#L19
variable "swf_monitors" {
  description = "List of monitoring swf statuses "
  type        = map(object({
    service                                  = string
    feed                                     = string
    completed_with_delay                     = string
    ingest_completed                         = string
    ingest_completed_validation_window_hours = optional(number, 8)
    expected_to_completed_hour_utc           = number
    expected_to_completed_minute             = number

  }))
  default = {
    spotify_sme = {
      service                        = "swf-spotify"
      feed                           = "spotify_sme"
      completed_with_delay           = "COMPLETED WITH DELAY"
      ingest_completed               = "INGESTED COMPLETED"
      expected_to_completed_hour_utc = 17
      expected_to_completed_minute   = 30
    },
    spotify_theorchard = {
      service                        = "swf-spotify"
      feed                           = "spotify_theorchard"
      completed_with_delay           = "COMPLETED WITH DELAY"
      ingest_completed               = "INGESTED COMPLETED"
      expected_to_completed_hour_utc = 17
      expected_to_completed_minute   = 30
    },
    apple_sme = {
      service                        = "swf-apple-music-streams"
      feed                           = "apple_sme"
      completed_with_delay           = "COMPLETED WITH DELAY"
      ingest_completed               = "INGESTED COMPLETED"
      expected_to_completed_hour_utc = 17
      expected_to_completed_minute   = 30
    },
    apple_theorchard = {
      service                        = "swf-apple-music-streams"
      feed                           = "apple_theorchard"
      completed_with_delay           = "COMPLETED WITH DELAY"
      ingest_completed               = "INGESTED COMPLETED"
      expected_to_completed_hour_utc = 17
      expected_to_completed_minute   = 30
    },
    amazon_music_sme_adsupported = {
      service                                  = "swf-amazon-music"
      feed                                     = "amazon_music_sme_adsupported"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 10
      expected_to_completed_hour_utc           = 1
      expected_to_completed_minute             = 20
    },
    amazon_music_theorchard_adsupported = {
      service                                  = "swf-amazon-music"
      feed                                     = "amazon_music_theorchard_adsupported"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 10
      expected_to_completed_hour_utc           = 1
      expected_to_completed_minute             = 20
    },
    amazon_music_sme_prime = {
      service                                  = "swf-amazon-music"
      feed                                     = "amazon_music_sme_prime"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 10
      expected_to_completed_hour_utc           = 1
      expected_to_completed_minute             = 20
    },
    amazon_music_theorchard_prime = {
      service                                  = "swf-amazon-music"
      feed                                     = "amazon_music_theorchard_prime"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 10
      expected_to_completed_hour_utc           = 1
      expected_to_completed_minute             = 20
    },
    amazon_music_sme_unlimited = {
      service                                  = "swf-amazon-music"
      feed                                     = "amazon_music_sme_unlimited"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 10
      expected_to_completed_hour_utc           = 1
      expected_to_completed_minute             = 20
    },
    amazon_music_theorchard_unlimited = {
      service                                  = "swf-amazon-music"
      feed                                     = "amazon_music_theorchard_unlimited"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 10
      expected_to_completed_hour_utc           = 1
      expected_to_completed_minute             = 20
    },
    tiktok_sme = {
      service                                  = "swf-tiktok"
      feed                                     = "tiktok_sme"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 17
      expected_to_completed_hour_utc           = 2
      expected_to_completed_minute             = 40
    },
    tiktok_theorchard = {
      service                                  = "swf-tiktok"
      feed                                     = "tiktok_theorchard"
      completed_with_delay                     = "COMPLETED WITH DELAY"
      ingest_completed                         = "INGESTED COMPLETED"
      ingest_completed_validation_window_hours = 17
      expected_to_completed_hour_utc           = 2
      expected_to_completed_minute             = 40
    },
  }
}
