Values and collections · 12 / 23
Load a CSV catalogue
Turn a supplied CSV into a stable keyed resource collection.
YOUR TASK
Make this happen
Use
codeas the csv key.Repair the Shipping row in teams.csv.
Inspect exactly two desired teams.
Read the starter files
main.cococo
team "departments" {
for_each = csv({ path = "teams.csv", key = "code" })
name = each.value.name
description = each.value.description
}
teams.csv
code,name,description packing,Packing,Packs orders shipping,TODO,Ships orders