Skip to content

Automating the creation of a Spotify playlist using terraform

Notifications You must be signed in to change notification settings

ayman1902/terraform_spotify

Repository files navigation

MAC (MUSIC AS CODE) Spotify Playlist Automation with Terraform

Terraform Spotify

This project demonstrates how to automate the creation of a Spotify playlist using Terraform. It uses the Terraform Spotify provider to configure and manage Spotify playlists programmatically.

Project Description

This project leverages Terraform to automate the creation of a Spotify playlist named "Ricci Rock Beldi," featuring tracks from the Moroccan band Hoba Hoba Spirit. It shows how to use Terraform to define playlist properties and add tracks using their Spotify URLs. By integrating with the Spotify API, this project enables seamless playlist management, allowing users to create and update their playlists effortlessly.

Prerequisites

  • A Spotify Developer account.
  • Terraform installed on your machine.
  • docker

Setup

1. Spotify Developer Account

  1. Sign up for a Spotify Developer account.
  2. Create a new application in the Spotify Developer Dashboard.
  3. Obtain your Client ID and Client Secret.
  4. Set the Redirect URI to http://localhost:8888/callback.

2. Terraform Installation

Ensure that Terraform is installed on your machine. You can download it from the official website.

3. Clone the Repository

Clone this repository to your local machine:

git clone https://github.com/ayman1902/terraform_spotify.git
cd terraform_spotify

4. How to use

First, you need an instance of a spotify oauth2 server running. This acts as a middleware between terraform and spotify to allow easy access to access tokens.

For a simple way to manage your spotify oauth2 tokens is to use https://oauth2.conrad.cafe. (source code)

Register a new account, create a spotify token with the following scopes

About

Automating the creation of a Spotify playlist using terraform

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages