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

31 lines
1.4 KiB

---
page_title: Built-in functions reference overview
description: |-
Functions built into HCL language can transform and combine values. Learn about using built-in functions in your Packer templates.
---
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
> [!IMPORTANT]
> **Documentation Update:** Product documentation previously located in `/website` has moved to the [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs) repository, where all product documentation is now centralized. Please make contributions directly to `web-unified-docs`, since changes to `/website` in this repository will not appear on developer.hashicorp.com.
⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️
# Built-in functions overview
This topic provides an overview of the built-in HashiCorp configuration language (HCL) functions you can use in your Packer templates.
## Functions syntax
You can use functions in Packer templates to transform and combine values. The
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 reference](/packer/docs/templates/hcl_templates/expressions#string-literals) section.
HCL does not support user-defined functions. You can only call
the functions built into the language.