github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/sort.html.md (about) 1 --- 2 layout: "language" 3 page_title: "sort - Functions - Configuration Language" 4 sidebar_current: "docs-funcs-collection-sort" 5 description: |- 6 The sort function takes a list of strings and returns a new list with those 7 strings sorted lexicographically. 8 --- 9 10 # `sort` Function 11 12 `sort` takes a list of strings and returns a new list with those strings 13 sorted lexicographically. 14 15 The sort is in terms of Unicode codepoints, with higher codepoints appearing 16 after lower ones in the result. 17 18 ## Examples 19 20 ``` 21 > sort(["e", "d", "a", "x"]) 22 [ 23 "a", 24 "d", 25 "e", 26 "x", 27 ] 28 ```