Create a playlist on Spotify by writing it as a Terraform configuration.
- Terraform Installed
- Docker
- Spotify Developer Account
- Develop an Spotify Authorization server for Manage Tokens
File | Description |
---|---|
main.tf | Manage the resouce |
versions.tf | Require provider version |
variables.tf | retrieve variable |
defaults.tf | define the values on vars |
provider.tf | Set provider |
backend.tf | Search tracks |
output.tf | obtain the result |
Set environment.
export SPOTIFY_CLIENT_REDIRECT_URI=http://localhost:27228/spotify_callback
# Initializing the backend for Generate Playlist
terraform init
Please you need to check if you authorize your application Don't run the next command without the previous authorization or this probably will fail
# Terraform will perform the action on resource
terraform apply
After succeed those commands your output, should be return your playlist. Then you may check on Spotify Search.
Find by the name of your playlist and thats it
Follow along with the tutorial at learn.hashicorp.com.