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/numeric/max.mdx

28 lines
646 B

---
page_title: max function reference
description: The `max` function return the largest number from the given ste of one or more numbers. Learn how to use the `max` function in Packer templates.
---
# `max` Function
`max` takes one or more numbers and returns the greatest number from the set.
## Examples
```shell-session
> max(12, 54, 3)
54
```
If the numbers are in a list or set value, use `...` to expand the collection
to individual arguments:
```shell-session
> max([12, 54, 3]...)
54
```
## Related Functions
- [`min`](/packer/docs/templates/hcl_templates/functions/numeric/min), which returns the _smallest_ number from a set.