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.
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.
- A Spotify Developer account.
- Terraform installed on your machine.
- docker
- Sign up for a Spotify Developer account.
- Create a new application in the Spotify Developer Dashboard.
- Obtain your Client ID and Client Secret.
- Set the Redirect URI to
http://localhost:8888/callback
.
Ensure that Terraform is installed on your machine. You can download it from the official website.
Clone this repository to your local machine:
git clone https://github.com/ayman1902/terraform_spotify.git
cd terraform_spotify
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