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

     1  ---
     2  page_title: reverse - Functions - Configuration Language
     3  description: The reverse function reverses a sequence.
     4  ---
     5  
     6  # `reverse` Function
     7  
     8  `reverse` takes a sequence and produces a new sequence of the same length
     9  with all of the same elements as the given sequence but in reverse order.
    10  
    11  ## Examples
    12  
    13  ```
    14  > reverse([1, 2, 3])
    15  [
    16    3,
    17    2,
    18    1,
    19  ]
    20  ```
    21  
    22  ## Related Functions
    23  
    24  * [`strrev`](/language/functions/strrev) reverses a string.