You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/content/docs/templates/hcl_templates/functions/index.mdx

27 lines
972 B

---
page_title: Functions - Configuration Language
description: |-
The HCL language has a number of built-in functions that can be called
from within expressions to transform and combine values.
---
# Built-in Functions
`@include 'from-1.5/beta-hcl2-note.mdx'`
The HCL language includes a number of built-in functions that you can
call from within expressions to transform and combine values. The general
syntax for function calls is a function name followed by comma-separated
arguments in parentheses:
```hcl
max(5, 12, 9)
```
For information on invoking functions in string literals, refer to the
[String Literals](https://developer.hashicorp.com/packer/docs/templates/hcl_templates/expressions#string-literals) section
in the HCL2 expressions documentation.
The HCL language does not support user-defined functions, and so only
the functions built in to the language are available for use. The documentation includes all of the available built-in functions.