encoding functions

docs/packer-seo-functions-batch3
trujillo-adam 1 year ago
parent c5036e233d
commit 8ad24fd454

@ -1,6 +1,6 @@
---
page_title: base64decode - Functions - Configuration Language
description: The base64decode function decodes a string containing a base64 sequence.
page_title: base64decode function reference
description: The `base64decode` function decodes a string containing a base64 sequence. Learn how to use the `base64decode` function in Packer templates.
---
# `base64decode` Function

@ -1,6 +1,6 @@
---
page_title: base64encode - Functions - Configuration Language
description: The base64encode function applies Base64 encoding to a string.
page_title: base64encode function reference
description: The `base64encode` function applies base64 encoding to a string. Learn how to use the `base64encode` function in Packer templates.
---
# `base64encode` Function

@ -1,7 +1,6 @@
---
page_title: base64gzip - Functions - Configuration Language
description: The base64encode function compresses the given string with gzip and then
encodes the result in Base64.
page_title: base64gzip function reference
description: The `base64gzip` function compresses the given string using gzip and then encodes the result in base64. Learn how to use the `base64gzip` in Packer templates.
---
# `base64gzip` Function

@ -1,6 +1,6 @@
---
page_title: csvdecode - Functions - Configuration Language
description: The csvdecode function decodes CSV data into a list of maps.
page_title: csvdecode function reference
description: The `csvdecode` function decodes CSV data into a list of maps. Learn how to use the `csvdecode` function in Packer templates.
---
# `csvdecode` Function

@ -1,8 +1,8 @@
---
page_title: jsondecode - Functions - Configuration Language
page_title: jsondecode function reference
description: |-
The jsondecode function decodes a JSON string into a representation of its
value.
The `jsondecode` function decodes a JSON string into a representation of its
value. Learn how to use the `jsondecode` function in Packer templates.
---
# `jsondecode` Function

@ -1,6 +1,6 @@
---
page_title: jsonencode - Functions - Configuration Language
description: The jsonencode function encodes a given value as a JSON string.
page_title: jsonencode function reference
description: The `jsonencode` function encodes a given value as a JSON string. Learn how to use the `jsonencode` function in Packer templates.
---
# `jsonencode` Function

@ -1,6 +1,6 @@
---
page_title: testdecodebase64 - Functions - Configuration Language
description: The testdecodebase64 function converts a base64 encoded string, whose underlying encoding is the one specified as argument, into a UTF-8 string.
page_title: testdecodebase64 function reference
description: The `testdecodebase64` function converts a base64-encoded string into a UTF-8 string. Learn how to use the `testdecodebase64` function in Packer templates.
---
# `textdecodebase64` Function

@ -1,6 +1,6 @@
---
page_title: testencodebase64 - Functions - Configuration Language
description: The testencodebase64 function converts a UTF-8 NFC input string to a base64 blob that encodes the target encoding's rendering of the input string.
page_title: testencodebase64 function reference
description: The `testencodebase64` function converts a UTF-8 NFC string into a base64 blob to match the destination encoding. Learn how to use the `testencodebase64` function in Packer templates.
---
# `textencodebase64` Function
@ -8,7 +8,7 @@ description: The testencodebase64 function converts a UTF-8 NFC input string to
Encodes the input string to the destination encoding.
The output is base64-encoded to account for HCL's string encoding limitations: they must be UTF-8, NFC-normalised.
Packer uses the "standard" Base64 alphabet as defined in
Packer uses the standard base64 alphabet as defined in
[RFC 4648 section 4](https://tools.ietf.org/html/rfc4648#section-4).
The `encoding_name` argument must contain one of the encoding names or aliases recorded in

@ -1,6 +1,6 @@
---
page_title: urlencode - Functions - Configuration Language
description: The urlencode function applies URL encoding to a given string.
page_title: urlencode function reference
description: The `urlencode` function applies URL encoding to a given string. Learn how to use the `urlencode` function in Packer templates.
---
# `urlencode` Function

@ -1,8 +1,8 @@
---
page_title: yamldecode - Functions - Configuration Language
page_title: yamldecode function reference
description: |-
The yamldecode function decodes a YAML string into a representation of its
value.
The `yamldecode` function decodes a YAML string into a representation of its
value. Learn how to use the `yamldecode` function in Packer templates.
---
# `yamldecode` Function

@ -1,6 +1,6 @@
---
page_title: yamlencode - Functions - Configuration Language
description: The yamlencode function encodes a given value as a YAML string.
page_title: yamlencode function reference
description: The `yamlencode` function encodes a given value as a YAML string. Learn how to use the `yamlencode` function in Packer templates.
---
# `yamlencode` Function

@ -1,16 +1,16 @@
---
page_title: Functions - Configuration Language
page_title: Built-in functions reference overview
description: |-
The HCL language has a number of built-in functions that can be called
from within expressions to transform and combine values.
Functions built into HCL language can transform and combine values. Learn about using built-in functions in your Packer templates.
---
# Built-in Functions
# Built-in functions overview
`@include 'from-1.5/beta-hcl2-note.mdx'`
This topic provides an overview of the built-in HashiCorp configuration language (HCL) functions you can use to create Packer templates.
The HCL language includes a number of built-in functions that you can
call from within expressions to transform and combine values. The general
## Functions syntax
You can use functions in Packer templates to transform and combine values. The general
syntax for function calls is a function name followed by comma-separated
arguments in parentheses:
@ -19,8 +19,7 @@ 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.
[string literals reference](/packer/docs/templates/hcl_templates/expressions#string-literals) section.
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.
HCL does not support user-defined functions. You can only call
the functions built into the language.

Loading…
Cancel
Save