d1e139c3fb
Add more detailed HCL2 docs, mostly lifted from Packer with tweaks for Nomad. The function docs are basically verbatim taken from Packer with basic string substitutions. I commented out some for_each details as the examples are mostly driven towards Packer resources. I'll iterate on those with better Nomad examples.
26 lines
795 B
Plaintext
26 lines
795 B
Plaintext
---
|
|
layout: docs
|
|
page_title: Functions - Configuration Language
|
|
sidebar_title: Functions
|
|
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 'beta-nomad1.0-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)
|
|
```
|
|
|
|
The HCL language does not support user-defined functions, and so only
|
|
the functions built in to the language are available for use. The navigation
|
|
for this section includes a list of all of the available built-in functions.
|