github.com/rstandt/terraform@v0.12.32-0.20230710220336-b1063613405c/website/docs/configuration/functions/max.html.md (about)

     1  ---
     2  layout: "functions"
     3  page_title: "max - Functions - Configuration Language"
     4  sidebar_current: "docs-funcs-numeric-max"
     5  description: |-
     6    The max function takes one or more numbers and returns the greatest number.
     7  ---
     8  
     9  # `max` Function
    10  
    11  -> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and
    12  earlier, see
    13  [0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html).
    14  
    15  `max` takes one or more numbers and returns the greatest number from the set.
    16  
    17  ## Examples
    18  
    19  ```
    20  > max(12, 54, 3)
    21  54
    22  ```
    23  
    24  If the numbers are in a list or set value, use `...` to expand the collection
    25  to individual arguments:
    26  
    27  ```
    28  > max([12, 54, 3]...)
    29  54
    30  ```
    31  
    32  ## Related Functions
    33  
    34  * [`min`](./min.html), which returns the _smallest_ number from a set.