Complex types
Unlock the complete study guide + 1,500 practice questions across 25 full exams.
Bundled into the existing HashiCorp Certified: Terraform Associate premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- The two families of complex type
- Collection types: list, set, and map
- Structural types: object and tuple
- Accessing elements
- Exam-pattern recognition
The five complex types at a glance
| Property | list | set | map | object | tuple |
|---|---|---|---|---|---|
| Family | collection | collection | collection | structural | structural |
| Element types | uniform | uniform | uniform | per attribute | per position |
| Ordering | ordered | unordered | string-keyed | named attributes | ordered |
| Duplicates | allowed | removed | keys unique | n/a | allowed |
| Element access | index [0] | not indexable | key ["k"] | .attr or ["attr"] | index [0] |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.