Skip to content
This repository was archived by the owner on Jul 24, 2025. It is now read-only.
This repository was archived by the owner on Jul 24, 2025. It is now read-only.

unable to create private playlist #46

@tampakrap

Description

@tampakrap

I am trying to create a private playlist without success. This is on the playlist creation:

➜ tf apply -target=spotify_playlist.test_private

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # spotify_playlist.test_private will be created
  + resource "spotify_playlist" "test_private" {
      + id          = (known after apply)
      + name        = "test if playlist can be private"
      + public      = false
      + snapshot_id = (known after apply)
      + tracks      = [
          + "4VWfod1Vw2b8VVruLKrUzx,
        ]
    }

Plan: 1 to add, 0 to change, 0 to destroy.

The next times that I run terraform apply I get the following:

Terraform will perform the following actions:

  # spotify_playlist.test_private will be updated in-place
  ~ resource "spotify_playlist" "test_private" {
        id          = "*******"
        name        = "test if playlist can be private"
      ~ public      = true -> false
        # (2 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

I confirm that the playlist is public in Spotify, no matter how many times I executed the apply. I took a look also at the tfstate file, which shows that the public param is properly set to false:

    {
      "mode": "managed",
      "type": "spotify_playlist",
      "name": "test_private",
      "provider": "provider[\"registry.terraform.io/conradludgate/spotify\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "description": "",
            "id": "*******",
            "name": "test if playlist can be private",
            "public": false,
            "snapshot_id": "*****",
            "tracks": [
              "4VWfod1Vw2b8VVruLKrUzx"
            ]
          },
          "sensitive_attributes": [],
          "private": "******"
        }
      ]
    }

According to the Spotify API docs, we need the playlist-modify-private authorization scope, which is properly set in spotify-auth-proxy so I'm clueless why it doesn't work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions