Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.09 KB

README.md

File metadata and controls

54 lines (42 loc) · 1.09 KB

Spotify Terraform

Introduction

Managing Spotify with Terraform and testing with Terratest
Reference: Create a Spotify playlist with Terraform


image

Usage

Spotify Authorization

  • Create an .env file in the root directory
echo "SPOTIFY_CLIENT_ID=<your client ID>" > .env && echo "SPOTIFY_CLIENT_SECRET=<your client secret>" >> .env
  • Start authorization
chmod 755 start.sh && ./start.sh
  • Stop authorization
chmod 755 stop.sh && ./stop.sh

Terraform Provisioning

  • Change the current working directory to the terraform directory
cd terraform
  • Initialize the Terraform configuration
terraform init
  • Generate and review an execution plan
terraform plan -out spotify
  • Apply the changes required to reach the desired state
terraform apply spotify
  • Destroy the managed infrastructure
terraform destroy