github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/transpose.html.md (about) 1 --- 2 layout: "language" 3 page_title: "transpose - Functions - Configuration Language" 4 sidebar_current: "docs-funcs-collection-transpose" 5 description: |- 6 The transpose function takes a map of lists of strings and swaps the keys 7 and values. 8 --- 9 10 # `transpose` Function 11 12 `transpose` takes a map of lists of strings and swaps the keys and values 13 to produce a new map of lists of strings. 14 15 ## Examples 16 17 ``` 18 > transpose({"a" = ["1", "2"], "b" = ["2", "3"]}) 19 { 20 "1" = [ 21 "a", 22 ], 23 "2" = [ 24 "a", 25 "b", 26 ], 27 "3" = [ 28 "b", 29 ], 30 } 31 ```