conradludgate / terraform-provider-spotify

Terraform provider for spotify

Home Page:https://registry.terraform.io/providers/conradludgate/spotify/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data source missing in tracks

nalinture opened this issue · comments

resource "spotify_playlist" "ariana_grande" {
name = "My Ariana Grande Playlist"

tracks = flatten([
spotify_search_track.ariana_grande.tracks[*].id,
])
}

data "spotify_search_track" "ariana_grande" {
artist = "Ariana Grande"
limit = 10
}

from the above given example, in the "tracks " nested schema, the tracks list should be prefixed with "data."

So the tracks nested schema be as follows,
tracks = flatten([
**data.**spotify_search_track.ariana_grande.tracks[*].id,
])