data source missing in tracks
nalinture opened this issue · comments
nalinture commented
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,
])