Merge pull request #13284 from hashicorp/docs/packer-seo-functions-batch3

Docs/packer seo functions batch3
docs/packer-seo-fy2025q4
trujillo-adam 1 year ago committed by GitHub
commit c310eac0cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -12,22 +12,20 @@ power of Packer templates.
## Third-Party plugins
The plugins listed below have been built by the community of Packer users and
vendors. These plugins are not officially tested nor officially maintained by
HashiCorp, and are listed here in order to help users find them easily.
To learn more about how to use community plugins, or how to build your own,
check out the docs on [extending Packer](/packer/docs/plugins/install)
refer to the docs on [extending Packer](/packer/docs/plugins/install)
If you have built a plugin and would like to add it to this community list,
please make a pull request so that we can document your
contribution here!
make a pull request so that we can document your contribution.
Refer to the following topics to learn about plugins built by the community of Packer users and
vendors. We do not test or maintain community plugins.
@include "builders/community_builders.mdx"
@include "provisioners/community_provisioners.mdx"
- [Community Builders](/packer/docs/builders/community-supported)
- [Community Provisioners](/packer/docs/provisioners/community-supported)
- [Community Post-Processors](/packer/docs/post-processors/community-supported)
@include "post-processors/community_post-processors.mdx"
## Templates

@ -1,7 +1,6 @@
---
description: |
The `hcp-packer-iteration` data source retrieves information about an
iteration from the HCP Packer registry. This data source is deprecated. Use the `hcpe-packer-verion` data source instead.
The `hcp-packer-iteration` data source retrieves information about an iteration from the HCP Packer registry. This data source is deprecated. Use the `hcpe-packer-verion` data source instead.
page_title: hcp-packer-iteration data source reference
---

@ -1,8 +1,7 @@
---
page_title: can - Functions - Configuration Language
page_title: can function reference
description: |-
The can function tries to evaluate an expression given as an argument and
indicates whether the evaluation succeeded.
The `can` function evaluates an expression and indicates whether it succeeds.
---
# `can` Function

@ -1,6 +1,6 @@
---
page_title: convert - Functions - Configuration Language
description: 'The convert function converts a value or an expression to a given type. '
page_title: convert function reference
description: The `convert` function converts a value or an expression to a given type.
---
# `convert` Function

@ -1,9 +1,7 @@
---
page_title: try - Functions - Configuration Language
page_title: try function reference
description: |-
The try function tries to evaluate a sequence of expressions given as
arguments and returns the result of the first one that does not produce
any errors.
The `try` function evaluates a sequence of expressions and returns the result of the first expression that does not produce any errors.
---
# `try` Function

@ -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 base64-encoded string.
---
# `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 encodes a string in base64 format.
---
# `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.
---
# `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.
---
# `csvdecode` Function

@ -1,8 +1,7 @@
---
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 its corresponding Packer value.
---
# `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.
---
# `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.
---
# `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.
---
# `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.
---
# `urlencode` Function

@ -1,8 +1,7 @@
---
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 its corresponding Packer value.
---
# `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.
---
# `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 in your 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
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.

@ -1,8 +1,8 @@
---
page_title: cidrhost - Functions - Configuration Language
page_title: cidrhost function reference
description: |-
The cidrhost function calculates a full host IP address within a given
IP network address prefix.
The `cidrhost` function calculates a full host IP address in a given
IP network address prefix.
---
# `cidrhost` Function

@ -1,8 +1,8 @@
---
page_title: cidrnetmask - Functions - Configuration Language
page_title: cidrnetmask function reference
description: |-
The cidrnetmask function converts an IPv4 address prefix given in CIDR
notation into a subnet mask address.
The `cidrnetmask` function converts an IPv4 address prefix given in CIDR
notation into a subnet mask address.
---
# `cidrnetmask` Function

@ -1,8 +1,8 @@
---
page_title: cidrsubnet - Functions - Configuration Language
page_title: cidrsubnet function reference
description: |-
The cidrsubnet function calculates a subnet address within a given IP network
address prefix.
The `cidrsubnet` function calculates a subnet address within a given IP network
address prefix.
---
# `cidrsubnet` Function

@ -1,8 +1,8 @@
---
page_title: cidrsubnets - Functions - Configuration Language
page_title: cidrsubnets function reference
description: |-
The cidrsubnets function calculates a sequence of consecutive IP address
ranges within a particular CIDR prefix.
The `cidrsubnets` function calculates a sequence of consecutive IP address
ranges in a CIDR prefix.
---
# `cidrsubnets` Function

@ -1,6 +1,6 @@
---
page_title: abs - Functions - Configuration Language
description: The abs function returns the absolute value of the given number.
page_title: abs function reference
description: The `abs` function returns the absolute value of the given number.
---
# `abs` Function

@ -1,8 +1,8 @@
---
page_title: ceil - Functions - Configuration Language
page_title: ceil function reference
description: |-
The ceil function returns the closest whole number greater than or equal to
the given value.
The `ceil` function returns the closest whole number greater than or equal to
the given value.
---
# `ceil` Function

@ -1,8 +1,8 @@
---
page_title: floor - Functions - Configuration Language
page_title: floor function reference
description: |-
The floor function returns the closest whole number less than or equal to
the given value.
The `floor` function returns the closest whole number less than or equal to
the given value.
---
# `floor` Function

@ -1,6 +1,6 @@
---
page_title: log - Functions - Configuration Language
description: The log function returns the logarithm of a given number in a given base.
page_title: log function reference
description: The `log` function returns the logarithm of a given number in a given base.
---
# `log` Function

@ -1,6 +1,6 @@
---
page_title: max - Functions - Configuration Language
description: The max function takes one or more numbers and returns the greatest number.
page_title: max function reference
description: The `max` function returns the largest number from the given set of one or more numbers.
---
# `max` Function

@ -1,6 +1,6 @@
---
page_title: min - Functions - Configuration Language
description: The min function takes one or more numbers and returns the smallest number.
page_title: min function reference
description: The `min` function returns the smallest number in a set of one or more numbers.
---
# `min` Function

@ -1,8 +1,8 @@
---
page_title: parseint - Functions - Configuration Language
page_title: parseint function reference
description: >-
The parseint function parses the given string as a representation of an
integer.
The `parseint` function parses the given string as a representation of an
integer.
---
# `parseint` Function

@ -1,6 +1,6 @@
---
page_title: pow - Functions - Configuration Language
description: The pow function raises a number to a power.
page_title: pow function reference
description: The `pow` function raises a number to a power.
---
# `pow` Function

@ -1,6 +1,6 @@
---
page_title: signum - Functions - Configuration Language
description: The signum function determines the sign of a number.
page_title: signum function reference
description: The `signum` function determines the sign of a number.
---
# `signum` Function

@ -1,6 +1,6 @@
---
page_title: chomp - Functions - Configuration Language
description: The chomp function removes newline characters at the end of a string.
page_title: chomp function reference
description: The `chomp` function removes newline characters at the end of a string.
---
# `chomp` Function

@ -1,8 +1,7 @@
---
page_title: format - Functions - Configuration Language
page_title: format function reference
description: |-
The format function produces a string by formatting a number of other values
according to a specification string.
The `format` function applies a specification to format values and produce a new string.
---
# `format` Function

@ -1,8 +1,7 @@
---
page_title: formatlist - Functions - Configuration Language
page_title: formatlist function reference
description: |-
The formatlist function produces a list of strings by formatting a number of
other values according to a specification string.
The `formatlist` function applies a specification to format values and produce a list of strings.
---
# `formatlist` Function

@ -1,7 +1,7 @@
---
page_title: indent - Functions - Configuration Language
page_title: indent function reference
description: |-
The indent function adds a number of spaces to the beginnings of all but the
The `indent` function adds spaces to the beginnings of all but the
first line of a given multi-line string.
---

@ -1,8 +1,8 @@
---
page_title: join - Functions - Configuration Language
page_title: join function reference
description: |-
The join function produces a string by concatenating the elements of a list
with a given delimiter.
The `join` function produces a string by concatenating the elements of a list
with a given delimiter.
---
# `join` Function

@ -1,8 +1,8 @@
---
page_title: lower - Functions - Configuration Language
page_title: lower function reference
description: >-
The lower function converts all cased letters in the given string to
lowercase.
The `lower` function converts all uppercase letters in the given string to
lowercase.
---
# `lower` Function

@ -1,7 +1,7 @@
---
page_title: regex - Functions - Configuration Language
page_title: regex function reference
description: |-
The regex function applies a regular expression to a string and returns the
The `regex` function applies a regular expression to a string and returns the
matching substrings.
---

@ -1,12 +1,7 @@
---
page_title: regex_replace - Functions - Configuration Language
page_title: regex_replace function reference
description: >-
The regex_replace function searches a given string for another given
substring,
and replaces all occurrences with a given replacement string. The substring
argument can be a valid regular expression or a string.
The `regex_replace` function matches and replaces all occurrences of a substring with a replacement string.
---
# `regex_replace` Function

@ -1,7 +1,7 @@
---
page_title: regexall - Functions - Configuration Language
page_title: regexall function reference
description: |-
The regexall function applies a regular expression to a string and returns a list of all matches.
The `regexall` function applies a regular expression to a string and returns a list of all matches.
---
# `regexall` Function

@ -1,8 +1,7 @@
---
page_title: replace - Functions - Configuration Language
page_title: replace function reference
description: |-
The replace function searches a given string for another given substring,
and replaces all occurrences with a given replacement string.
The `replace` function replaces all occurrences of substring with a given string.
---
# `replace` Function

@ -1,8 +1,7 @@
---
page_title: split - Functions - Configuration Language
page_title: split function reference
description: |-
The split function produces a list by dividing a given string at all
occurrences of a given separator.
The `split` function divides the given string according to the specified separator to produce a list.
---
# `split` Function

@ -1,12 +1,12 @@
---
page_title: strcontains - Functions - Configuration Language
page_title: strcontains function reference
description: |-
The strcontains function checks whether a given string can be found within another string.
The `strcontains` function searches for a substring within a string.
---
# `strcontains` Function
`strcontains` function checks whether a substring is within another string.
The `strcontains` function searches for a substring within a string.
```hcl
strcontains(string, substr)

@ -1,6 +1,6 @@
---
page_title: strrev - Functions - Configuration Language
description: The strrev function reverses a string.
page_title: strrev function reference
description: The `strrev` function reverses a string.
---
# `strrev` Function

@ -1,8 +1,8 @@
---
page_title: substr - Functions - Configuration Language
page_title: substr function reference
description: |-
The substr function extracts a substring from a given string by offset and
length.
The `substr` function extracts a substring from a given string using an offset and
length.
---
# `substr` Function

@ -1,7 +1,7 @@
---
page_title: title - Functions - Configuration Language
page_title: title function reference
description: |-
The title function converts the first letter of each word in a given string
The `title` function converts the first letter of each word in a given string
to uppercase.
---

@ -1,8 +1,8 @@
---
page_title: trim - Functions - Configuration Language
page_title: trim function reference
description: |-
The trim function removes the specified characters from the start and end of
a given string.
The `trim` function removes the specified characters from the start and end of
a given string.
---
# `trim` Function

@ -1,8 +1,8 @@
---
page_title: trimprefix - Functions - Configuration Language
page_title: trimprefix function reference
description: |-
The trimprefix function removes the specified prefix from the start of a
given string.
The `trimprefix` function removes the specified prefix from the start of a
given string.
---
# `trimprefix` Function

@ -1,8 +1,8 @@
---
page_title: trimspace - Functions - Configuration Language
page_title: trimspace function reference
description: |-
The trimspace function removes space characters from the start and end of
a given string.
The `trimspace` function removes space characters from the start and end of
a given string.
---
# `trimspace` Function

@ -1,8 +1,8 @@
---
page_title: trimsuffix - Functions - Configuration Language
page_title: trimsuffix function reference
description: |-
The trimsuffix function removes the specified suffix from the end of a
given string.
The `trimsuffix` function removes the specified suffix from the end of a
given string.
---
# `trimsuffix` Function

@ -1,7 +1,7 @@
---
page_title: upper - Functions - Configuration Language
page_title: upper function reference
description: >-
The upper function converts all cased letters in the given string to
The `upper` function converts all lowercase letters in the given string to
uppercase.
---

@ -1,6 +1,6 @@
---
page_title: v4 - uuid - Functions - Configuration Language
description: The uuidv4 function generates a unique ID.
page_title: uuidv4 function reference
description: The `uuidv4` function generates a unique string ID according to RFC 4122 version 4.
---
# `uuidv4` Function

@ -1,8 +1,7 @@
---
page_title: uuidv5 - Functions - Configuration Language
page_title: uuidv5 function reference
description: |-
The uuidv5 function generates a uuid v5 string representation of the value in
the specified namespace.
The `uuidv5` function generates a unique name-based ID for the value according to RFC 4122 version 5.
---
# `uuidv5` Function

@ -95,7 +95,7 @@ module.exports = [
source: '/packer/docs/provisioners/custom',
destination: '/packer/docs/plugins/creation/custom-provisioners',
permanent: true,
}
},
/**
* END EMPTY PAGE REDIRECTS
*/

Loading…
Cancel
Save