A practitioner is choosing a Terraform collection type to hold a group of values where duplicates are meaningless and the ordering of elements should not matter. Which complex type best matches these requirements?
- AA list, because it stores an ordered sequence and quietly discards any duplicate values that are added to it.
- BA set, because it stores an unordered collection of unique values of the same type and treats repeated values as one. Correct
- CA map, because it stores values under unique string keys and therefore ignores both ordering and duplication.
- DA tuple, because it stores a fixed sequence of elements and removes any element that appears more than once.
Why A is wrong: A list is ordered and preserves duplicates, so it neither ignores order nor removes repeated values; the claim that it discards duplicates is untrue.
Why B is correct: A set is unordered and holds only distinct values of a single element type, which is exactly what is wanted when duplicates carry no meaning and order is irrelevant.
Why C is wrong: A map does key each value uniquely, but it is a keyed structure rather than a plain collection of values, so it does not match a requirement expressed purely in terms of values.
Why D is wrong: A tuple has a fixed length and ordered positions and may hold elements of differing types; it neither drops duplicates nor ignores order, so it fails the requirement.