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

     1  ---
     2  layout: "functions"
     3  page_title: "min - Functions - Configuration Language"
     4  sidebar_current: "docs-funcs-numeric-min"
     5  description: |-
     6    The min function takes one or more numbers and returns the smallest number.
     7  ---
     8  
     9  # `min` 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  `min` takes one or more numbers and returns the smallest number from the set.
    16  
    17  ## Examples
    18  
    19  ```
    20  > min(12, 54, 3)
    21  3
    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  > min([12, 54, 3]...)
    29  3
    30  ```
    31  
    32  ## Related Functions
    33  
    34  * [`max`](./max.html), which returns the _greatest_ number from a set.