/* locals {
  table_schedule = {
    "amazon_music" = ,
    "apple_music" = ,
    "chartmetric" = ,
    "charts" = ,
    "spotify" = ,
    "tiktok" = ,
    "youtube" = ,
  }

}

resource "google_cloud_scheduler_job" "bigtable_backup_job" {
  name        = "delphi-bigtable-backup-job"
  description = "Schedule Bigtable backups"
  schedule    = "0 0 * * *"

  pubsub_target {
    topic_name = google_pubsub_topic.bigtable_backups_topic.id
    data = base64encode(
      jsonencode(
        {
          tables = [
            "amazon_music",
            "apple_fact_public_playlist_daily",
            "apple_music",
            "chartmetric",
            "charts",
            "playlists",
            "playlist_tracks",
            "spotify",
            "spotify_fact_public_playlist_daily",
            "tiktok",
            "youtube",
          ]
        }
      )
    )
  }
} */
