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

     1  ---
     2  page_title: transpose - Functions - Configuration Language
     3  description: |-
     4    The transpose function takes a map of lists of strings and swaps the keys
     5    and values.
     6  ---
     7  
     8  # `transpose` Function
     9  
    10  `transpose` takes a map of lists of strings and swaps the keys and values
    11  to produce a new map of lists of strings.
    12  
    13  ## Examples
    14  
    15  ```
    16  > transpose({"a" = ["1", "2"], "b" = ["2", "3"]})
    17  {
    18    "1" = [
    19      "a",
    20    ],
    21    "2" = [
    22      "a",
    23      "b",
    24    ],
    25    "3" = [
    26      "b",
    27    ],
    28  }
    29  ```