github.com/iaas-resource-provision/iaas-rpc@v1.0.7-0.20211021023331-ed21f798c408/website/docs/language/functions/index.html.md (about)

     1  ---
     2  layout: "language"
     3  page_title: "Functions - Configuration Language"
     4  sidebar_current: "docs-config-functions"
     5  description: |-
     6    The Terraform language has a number of built-in functions that can be called
     7    from within expressions to transform and combine values.
     8  ---
     9  
    10  # Built-in Functions
    11  
    12  > **Hands-on:** Try the [Perform Dynamic Operations with Functions](https://learn.hashicorp.com/tutorials/terraform/functions?in=terraform/configuration-language&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial on HashiCorp Learn.
    13  
    14  The Terraform language includes a number of built-in functions that you can
    15  call from within expressions to transform and combine values. The general
    16  syntax for function calls is a function name followed by comma-separated
    17  arguments in parentheses:
    18  
    19  ```hcl
    20  max(5, 12, 9)
    21  ```
    22  
    23  For more details on syntax, see
    24  [_Function Calls_](/docs/language/expressions/function-calls.html)
    25  in the Expressions section.
    26  
    27  The Terraform language does not support user-defined functions, and so only
    28  the functions built in to the language are available for use. The navigation
    29  for this section includes a list of all of the available built-in functions.
    30  
    31  You can experiment with the behavior of Terraform's built-in functions from
    32  the Terraform expression console, by running
    33  [the `terraform console` command](/docs/cli/commands/console.html):
    34  
    35  ```
    36  > max(5, 12, 9)
    37  12
    38  ```
    39  
    40  The examples in the documentation for each function use console output to
    41  illustrate the result of calling the function with different parameters.