Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs/packer seo functions batch3 #13284

Merged
18 changes: 8 additions & 10 deletions website/content/docs/community-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
---

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
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

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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 10 additions & 11 deletions website/content/docs/templates/hcl_templates/functions/index.mdx
Original file line number Diff line number Diff line change
@@ -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:

Expand All @@ -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.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
---

Expand Down
Loading