resource "powerdns_record" "foobar" { count = length(var.zone-records) zone = var.zone-records[count.index].zone name = var.zone-records[count.index].name type = var.zone-records[count.index].type ttl = var.zone-records[count.index].ttl records = var.zone-records[count.index].record }