github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/distinct.mdx (about)

     1  ---
     2  page_title: distinct - Functions - Configuration Language
     3  description: The distinct function removes duplicate elements from a list.
     4  ---
     5  
     6  # `distinct` Function
     7  
     8  `distinct` takes a list and returns a new list with any duplicate elements
     9  removed.
    10  
    11  The first occurrence of each value is retained and the relative ordering of
    12  these elements is preserved.
    13  
    14  ## Examples
    15  
    16  ```
    17  > distinct(["a", "b", "a", "c", "d", "b"])
    18  [
    19    "a",
    20    "b",
    21    "c",
    22    "d",
    23  ]
    24  ```