From 8ad24fd454520da1bfa16414386e828801116450 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Tue, 28 Jan 2025 15:39:09 -0800 Subject: [PATCH 01/11] encoding functions --- .../functions/encoding/base64decode.mdx | 4 ++-- .../functions/encoding/base64encode.mdx | 4 ++-- .../functions/encoding/base64gzip.mdx | 5 ++--- .../functions/encoding/csvdecode.mdx | 4 ++-- .../functions/encoding/jsondecode.mdx | 6 +++--- .../functions/encoding/jsonencode.mdx | 4 ++-- .../functions/encoding/textdecodebase64.mdx | 4 ++-- .../functions/encoding/textencodebase64.mdx | 6 +++--- .../functions/encoding/urlencode.mdx | 4 ++-- .../functions/encoding/yamldecode.mdx | 6 +++--- .../functions/encoding/yamlencode.mdx | 4 ++-- .../hcl_templates/functions/index.mdx | 21 +++++++++---------- 12 files changed, 35 insertions(+), 37 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx index 8d918823047..7374373f20f 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx index 2d3441d8887..24788be4d8a 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx index c015077dfa3..95eed727239 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx index 88cb42d49e6..1c41c3fb617 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx index ade3fd2bd1d..96a68fa5612 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx index fb75ee7fa84..f9c92b89dcc 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx index 923d66bc843..fab4bd4f000 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx index 6abff637139..a255719db1d 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx index a2b8de5cc74..40d3cdc974d 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx index ea787ca2c06..3157b039fcc 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx index 2aa0174714c..b37cad99c7a 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx @@ -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 diff --git a/website/content/docs/templates/hcl_templates/functions/index.mdx b/website/content/docs/templates/hcl_templates/functions/index.mdx index 0a9ee2a9eee..3a504a1f981 100644 --- a/website/content/docs/templates/hcl_templates/functions/index.mdx +++ b/website/content/docs/templates/hcl_templates/functions/index.mdx @@ -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. From 8b84cce61106f438080ac9ee8b715cc7c15e0697 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Tue, 28 Jan 2025 16:00:32 -0800 Subject: [PATCH 02/11] numeric and conversion functions --- .../templates/hcl_templates/functions/conversion/can.mdx | 6 +++--- .../hcl_templates/functions/conversion/convert.mdx | 4 ++-- .../templates/hcl_templates/functions/conversion/try.mdx | 6 ++---- .../docs/templates/hcl_templates/functions/numeric/abs.mdx | 4 ++-- .../docs/templates/hcl_templates/functions/numeric/ceil.mdx | 6 +++--- .../templates/hcl_templates/functions/numeric/floor.mdx | 6 +++--- .../docs/templates/hcl_templates/functions/numeric/log.mdx | 4 ++-- .../docs/templates/hcl_templates/functions/numeric/max.mdx | 4 ++-- .../docs/templates/hcl_templates/functions/numeric/min.mdx | 4 ++-- .../templates/hcl_templates/functions/numeric/parseint.mdx | 6 +++--- .../docs/templates/hcl_templates/functions/numeric/pow.mdx | 4 ++-- .../templates/hcl_templates/functions/numeric/signum.mdx | 4 ++-- 12 files changed, 28 insertions(+), 30 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx index 4272cbbcbe5..9a1d34bbac1 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx @@ -1,8 +1,8 @@ --- -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 as an argument and + indicates whether the evaluation succeeded. Learn how to us the `can` function in Packer templates. --- # `can` Function diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx index 5cb90d1576e..e65b8218e87 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx @@ -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. Learn how to use the `convert` function in Packer templates. --- # `convert` Function diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx index a34e6e293c8..fceaf4a6119 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx @@ -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 evaluate a sequence of expressions and returns the result of the first expression that does not produce any errors. Learn how to use the `try` function in Packer templates. --- # `try` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx index 023b415572b..aa80d9a1d52 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx @@ -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. Learn how to use the `abs` function in Packer templates. --- # `abs` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx index 2c3e9a70f10..e954977e1df 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx @@ -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. Learn how to use the `ceil` function in Packer templates. --- # `ceil` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx index 66faf73f200..b61e07f5ecc 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx @@ -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. Learn how to use the `floor` function in Packer templates. --- # `floor` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx index c63952e05a8..c21374d0dcc 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx @@ -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. Learn how to use the `log` function in Packer templates. --- # `log` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx index 36f8ac2554e..363df6e24f9 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx @@ -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 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 diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx index 64e697143ab..31a8b2b47b2 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx @@ -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. Learn how to use the `min` function in Packer templates. --- # `min` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx index 3b8ac241185..e997a7717c3 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx @@ -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. Learn how to use the `parseint` function in Packer templates. --- # `parseint` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx index e8702cba972..63743d62ed0 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx @@ -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. Learn how to use the `pow` function in Packer templates. --- # `pow` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx index 1caf6988389..17bf2323ea1 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx @@ -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. Learn how to use the `signum` function in Packer templates. --- # `signum` Function From d8fa10e6ebceab465bbc915a86e1ec2102c17f8b Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Wed, 29 Jan 2025 09:51:34 -0800 Subject: [PATCH 03/11] string functions --- .../templates/hcl_templates/functions/string/chomp.mdx | 4 ++-- .../templates/hcl_templates/functions/string/format.mdx | 5 ++--- .../hcl_templates/functions/string/formatlist.mdx | 5 ++--- .../templates/hcl_templates/functions/string/indent.mdx | 6 +++--- .../templates/hcl_templates/functions/string/join.mdx | 6 +++--- .../templates/hcl_templates/functions/string/lower.mdx | 6 +++--- .../templates/hcl_templates/functions/string/regex.mdx | 6 +++--- .../hcl_templates/functions/string/regex_replace.mdx | 9 ++------- .../hcl_templates/functions/string/regexall.mdx | 4 ++-- .../templates/hcl_templates/functions/string/replace.mdx | 5 ++--- .../templates/hcl_templates/functions/string/split.mdx | 5 ++--- .../hcl_templates/functions/string/strcontains.mdx | 6 +++--- .../templates/hcl_templates/functions/string/strrev.mdx | 4 ++-- .../templates/hcl_templates/functions/string/substr.mdx | 6 +++--- .../templates/hcl_templates/functions/string/title.mdx | 6 +++--- .../templates/hcl_templates/functions/string/trim.mdx | 6 +++--- .../hcl_templates/functions/string/trimprefix.mdx | 6 +++--- .../hcl_templates/functions/string/trimspace.mdx | 6 +++--- .../hcl_templates/functions/string/trimsuffix.mdx | 6 +++--- .../templates/hcl_templates/functions/string/upper.mdx | 6 +++--- 20 files changed, 52 insertions(+), 61 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx b/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx index 9586ab280ed..47a13b06d0b 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx @@ -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. Learn how to use the `chomp` function in Packer templates. --- # `chomp` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/format.mdx b/website/content/docs/templates/hcl_templates/functions/string/format.mdx index 7ac645ffedf..569c0e3ab0f 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/format.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/format.mdx @@ -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. Learn how to use the `format` function in Packer templates. --- # `format` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx b/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx index 6d110ae2065..8503de8c434 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx @@ -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. Learn how to use the `formatlist` function in Packer templates. --- # `formatlist` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/indent.mdx b/website/content/docs/templates/hcl_templates/functions/string/indent.mdx index 158a22a4971..d68a7970b6a 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/indent.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/indent.mdx @@ -1,8 +1,8 @@ --- -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 - first line of a given multi-line string. + The `indent` function adds spaces to the beginnings of all but the + first line of a given multi-line string. Learn how to use the `indent` function in Packer templates. --- # `indent` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/join.mdx b/website/content/docs/templates/hcl_templates/functions/string/join.mdx index acdbaa8ae03..d8c4de04e00 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/join.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/join.mdx @@ -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. Learn how to use the `join` function in Packer templates. --- # `join` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/lower.mdx b/website/content/docs/templates/hcl_templates/functions/string/lower.mdx index 65482482207..39c3a5df7da 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/lower.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/lower.mdx @@ -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. Learn how to use the `lower` function in Packer templates. --- # `lower` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/regex.mdx b/website/content/docs/templates/hcl_templates/functions/string/regex.mdx index 74d55a647a4..6cce4356c04 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regex.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regex.mdx @@ -1,8 +1,8 @@ --- -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 - matching substrings. + The `regex` function applies a regular expression to a string and returns the + matching substrings. Learn how to use the `regex` function in Packer templates. --- # `regex` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx b/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx index 29d10b8e095..cbfb66a682a 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx @@ -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. Learn how to use the `regex_replace` function in Packer templates. --- # `regex_replace` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx b/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx index 96900698148..0e2d500f989 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx @@ -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. Learn how to use the `regexall` function in Packer templates. --- # `regexall` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/replace.mdx b/website/content/docs/templates/hcl_templates/functions/string/replace.mdx index 4097756f9b1..5ffd43ba35f 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/replace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/replace.mdx @@ -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. Learn how to use the `replace` function in Packer templates. --- # `replace` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/split.mdx b/website/content/docs/templates/hcl_templates/functions/string/split.mdx index 677b10a924b..eaa43d5372f 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/split.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/split.mdx @@ -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. Learn how to use the `split` function in Packer templates. --- # `split` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx b/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx index ea3389c37a0..2a1cfbbdc24 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx @@ -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. Learn how to use the `strcontains` function in Packer templates. --- # `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) diff --git a/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx b/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx index c543bfeb93a..49639de4f48 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx @@ -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. Learn how to use the `strrev` function in Packer templates. --- # `strrev` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/substr.mdx b/website/content/docs/templates/hcl_templates/functions/string/substr.mdx index 594feb28e77..76693b463f5 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/substr.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/substr.mdx @@ -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. Learn how to use the `substr` function in Packer templates. --- # `substr` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/title.mdx b/website/content/docs/templates/hcl_templates/functions/string/title.mdx index 15d40f3d0b8..475e76581ec 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/title.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/title.mdx @@ -1,8 +1,8 @@ --- -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 - to uppercase. + The `title` function converts the first letter of each word in a given string + to uppercase. Learn how to use the `title` function in Packer templates. --- # `title` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trim.mdx b/website/content/docs/templates/hcl_templates/functions/string/trim.mdx index 321a46eac0e..e0e2408578a 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trim.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trim.mdx @@ -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. Learn how to use the `trim` function in Packer templates. --- # `trim` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx index f9396edc0fd..bbe3b3af3bf 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx @@ -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. Learn how to use the `trimprefix` function in Packer templates. --- # `trimprefix` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx index a1f619083a9..01fba86c3e8 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx @@ -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. Learn how to use the `trimpsace` function in Packer templates. --- # `trimspace` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx index e69644ca374..ad17dcd5722 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx @@ -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. Learn how to use the `trimsuffix` function in Packer templates. --- # `trimsuffix` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/upper.mdx b/website/content/docs/templates/hcl_templates/functions/string/upper.mdx index 7a6bb0a5b64..2219cc07367 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/upper.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/upper.mdx @@ -1,8 +1,8 @@ --- -page_title: upper - Functions - Configuration Language +page_title: upper function reference description: >- - The upper function converts all cased letters in the given string to - uppercase. + The `upper` function converts all lowercase letters in the given string to + uppercase. Learn how to use the `upper` function in Packer templates. --- # `upper` Function From b417abafa02e26b55f15e138dfb6ea0663873401 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Wed, 29 Jan 2025 10:18:14 -0800 Subject: [PATCH 04/11] ipnet and uuid funcs --- .../templates/hcl_templates/functions/ipnet/cidrhost.mdx | 6 +++--- .../templates/hcl_templates/functions/ipnet/cidrnetmask.mdx | 6 +++--- .../templates/hcl_templates/functions/ipnet/cidrsubnet.mdx | 6 +++--- .../templates/hcl_templates/functions/ipnet/cidrsubnets.mdx | 6 +++--- .../docs/templates/hcl_templates/functions/uuid/uuidv4.mdx | 4 ++-- .../docs/templates/hcl_templates/functions/uuid/uuidv5.mdx | 5 ++--- 6 files changed, 16 insertions(+), 17 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx index 77c5679990c..d1b9ea70e37 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx @@ -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. Learn how to use the `ciderhost` function in Packer templates. --- # `cidrhost` Function diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx index fbb43eec471..51541e09ab9 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx @@ -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. Learn how to use the `cidernetmask` function in Packer templates. --- # `cidrnetmask` Function diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx index fbe916df750..1230e62a0d0 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx @@ -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. Learn how to use the `cidersubnet` function in Packer templates. --- # `cidrsubnet` Function diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx index faac15f8b84..30985b61240 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx @@ -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. Learn how to use the `cidersubnets` function in Packer templates. --- # `cidrsubnets` Function diff --git a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx index 3c03179528f..be0190f7bc4 100644 --- a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx +++ b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx @@ -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. Learn how to use the `uuidv4` function in Packer templates. --- # `uuidv4` Function diff --git a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx index 310b4b1305c..bcc5d15acb5 100644 --- a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx +++ b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx @@ -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. Learn how to use the `uuidv5` function in Packer templates. --- # `uuidv5` Function From 8e6c32ce199fdad750d070d14734a96752e76d98 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Wed, 29 Jan 2025 14:15:55 -0800 Subject: [PATCH 05/11] fix typo --- .../docs/templates/hcl_templates/functions/numeric/max.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx index 363df6e24f9..34066bd2043 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `max` function returns the largest number from the given set of one or more numbers. Learn how to use the `max` function in Packer templates. --- # `max` Function From 06af5e646de740df627ca6853efc625be5f5aef1 Mon Sep 17 00:00:00 2001 From: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:05:01 -0800 Subject: [PATCH 06/11] Apply suggestions from code review Co-authored-by: rita <8647768+ritsok@users.noreply.github.com> --- .../docs/templates/hcl_templates/functions/conversion/can.mdx | 3 +-- .../templates/hcl_templates/functions/conversion/convert.mdx | 2 +- .../docs/templates/hcl_templates/functions/conversion/try.mdx | 2 +- .../hcl_templates/functions/encoding/base64encode.mdx | 2 +- .../templates/hcl_templates/functions/encoding/base64gzip.mdx | 2 +- .../templates/hcl_templates/functions/encoding/csvdecode.mdx | 2 +- .../templates/hcl_templates/functions/encoding/jsondecode.mdx | 3 +-- .../templates/hcl_templates/functions/encoding/jsonencode.mdx | 2 +- .../hcl_templates/functions/encoding/textdecodebase64.mdx | 2 +- .../hcl_templates/functions/encoding/textencodebase64.mdx | 2 +- .../templates/hcl_templates/functions/encoding/urlencode.mdx | 2 +- .../templates/hcl_templates/functions/encoding/yamldecode.mdx | 3 +-- .../templates/hcl_templates/functions/encoding/yamlencode.mdx | 2 +- .../content/docs/templates/hcl_templates/functions/index.mdx | 4 ++-- 14 files changed, 15 insertions(+), 18 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx index 9a1d34bbac1..8115f6ccdc2 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/can.mdx @@ -1,8 +1,7 @@ --- page_title: can function reference description: |- - The `can` function evaluates an expression as an argument and - indicates whether the evaluation succeeded. Learn how to us the `can` function in Packer templates. + The `can` function evaluates an expression and indicates whether it succeeds. --- # `can` Function diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx index e65b8218e87..952126f6cb5 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/convert.mdx @@ -1,6 +1,6 @@ --- page_title: convert function reference -description: The `convert` function converts a value or an expression to a given type. Learn how to use the `convert` function in Packer templates. +description: The `convert` function converts a value or an expression to a given type. --- # `convert` Function diff --git a/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx b/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx index fceaf4a6119..94e70d0ad5b 100644 --- a/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx +++ b/website/content/docs/templates/hcl_templates/functions/conversion/try.mdx @@ -1,7 +1,7 @@ --- page_title: try function reference description: |- - The `try` function evaluate a sequence of expressions and returns the result of the first expression that does not produce any errors. Learn how to use the `try` function in Packer templates. + The `try` function evaluates a sequence of expressions and returns the result of the first expression that does not produce any errors. --- # `try` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx index 24788be4d8a..a80e5bc1a3a 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64encode.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `base64encode` function encodes a string in base64 format. --- # `base64encode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx index 95eed727239..ce7dbe6bbb1 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64gzip.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `base64gzip` function compresses the given string using gzip and then encodes the result in base64. --- # `base64gzip` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx index 1c41c3fb617..a558a5c085f 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/csvdecode.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `csvdecode` function decodes CSV data into a list of maps. --- # `csvdecode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx index 96a68fa5612..c55783de040 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/jsondecode.mdx @@ -1,8 +1,7 @@ --- page_title: jsondecode function reference description: |- - The `jsondecode` function decodes a JSON string into a representation of its - value. Learn how to use the `jsondecode` function in Packer templates. + The `jsondecode` function decodes a JSON string into its corresponding Packer value. --- # `jsondecode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx index f9c92b89dcc..4304ff96ddb 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/jsonencode.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `jsonencode` function encodes a given value as a JSON string. --- # `jsonencode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx index fab4bd4f000..7a0b060538e 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/textdecodebase64.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `testdecodebase64` function converts a base64-encoded string into a UTF-8 string. --- # `textdecodebase64` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx index a255719db1d..7a10a571626 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/textencodebase64.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `testencodebase64` function converts a UTF-8 NFC string into a base64 blob to match the destination encoding. --- # `textencodebase64` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx index 40d3cdc974d..fbe7d7bf50d 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/urlencode.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `urlencode` function applies URL encoding to a given string. --- # `urlencode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx index 3157b039fcc..c397d6fb736 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/yamldecode.mdx @@ -1,8 +1,7 @@ --- page_title: yamldecode function reference description: |- - The `yamldecode` function decodes a YAML string into a representation of its - value. Learn how to use the `yamldecode` function in Packer templates. + The `yamldecode` function decodes a YAML string into its corresponding Packer value. --- # `yamldecode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx index b37cad99c7a..0b8f5c9e3e9 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/yamlencode.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `yamlencode` function encodes a given value as a YAML string. --- # `yamlencode` Function diff --git a/website/content/docs/templates/hcl_templates/functions/index.mdx b/website/content/docs/templates/hcl_templates/functions/index.mdx index 3a504a1f981..9a074eeec07 100644 --- a/website/content/docs/templates/hcl_templates/functions/index.mdx +++ b/website/content/docs/templates/hcl_templates/functions/index.mdx @@ -6,11 +6,11 @@ description: |- # Built-in functions overview -This topic provides an overview of the built-in HashiCorp configuration language (HCL) functions you can use to create Packer templates. +This topic provides an overview of the built-in HashiCorp configuration language (HCL) functions you can use in your Packer templates. ## Functions syntax -You can use functions in Packer templates to transform and combine values. The general +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: From 3e3459b3a8099b83ecbd0216593e926323037bc1 Mon Sep 17 00:00:00 2001 From: trujillo-adam <47586768+trujillo-adam@users.noreply.github.com> Date: Thu, 30 Jan 2025 10:06:13 -0800 Subject: [PATCH 07/11] Update website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx Co-authored-by: rita <8647768+ritsok@users.noreply.github.com> --- .../templates/hcl_templates/functions/encoding/base64decode.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx b/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx index 7374373f20f..1ccc24e961b 100644 --- a/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx +++ b/website/content/docs/templates/hcl_templates/functions/encoding/base64decode.mdx @@ -1,6 +1,6 @@ --- 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. +description: The `base64decode` function decodes a base64-encoded string. --- # `base64decode` Function From c3df63af1e571200d12afc5f3ce7167f3487f51b Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Thu, 30 Jan 2025 10:14:03 -0800 Subject: [PATCH 08/11] removed 'learn to' keyword phrases --- .../docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx | 2 +- .../templates/hcl_templates/functions/ipnet/cidrnetmask.mdx | 2 +- .../docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx | 2 +- .../templates/hcl_templates/functions/ipnet/cidrsubnets.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/abs.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/ceil.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/floor.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/log.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/max.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/min.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/parseint.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/pow.mdx | 2 +- .../docs/templates/hcl_templates/functions/numeric/signum.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/chomp.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/format.mdx | 2 +- .../templates/hcl_templates/functions/string/formatlist.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/indent.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/join.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/lower.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/regex.mdx | 2 +- .../templates/hcl_templates/functions/string/regex_replace.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/regexall.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/replace.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/split.mdx | 2 +- .../templates/hcl_templates/functions/string/strcontains.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/strrev.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/substr.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/title.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/trim.mdx | 2 +- .../templates/hcl_templates/functions/string/trimprefix.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/trimspace.mdx | 2 +- .../templates/hcl_templates/functions/string/trimsuffix.mdx | 2 +- .../docs/templates/hcl_templates/functions/string/upper.mdx | 2 +- .../docs/templates/hcl_templates/functions/uuid/uuidv4.mdx | 2 +- .../docs/templates/hcl_templates/functions/uuid/uuidv5.mdx | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx index d1b9ea70e37..0682f1b2e44 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrhost.mdx @@ -2,7 +2,7 @@ page_title: cidrhost function reference description: |- The `cidrhost` function calculates a full host IP address in a given - IP network address prefix. Learn how to use the `ciderhost` function in Packer templates. + IP network address prefix. --- # `cidrhost` Function diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx index 51541e09ab9..04869b9825b 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrnetmask.mdx @@ -2,7 +2,7 @@ page_title: cidrnetmask function reference description: |- The `cidrnetmask` function converts an IPv4 address prefix given in CIDR - notation into a subnet mask address. Learn how to use the `cidernetmask` function in Packer templates. + notation into a subnet mask address. --- # `cidrnetmask` Function diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx index 1230e62a0d0..055bfb11c3a 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnet.mdx @@ -2,7 +2,7 @@ page_title: cidrsubnet function reference description: |- The `cidrsubnet` function calculates a subnet address within a given IP network - address prefix. Learn how to use the `cidersubnet` function in Packer templates. + address prefix. --- # `cidrsubnet` Function diff --git a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx index 30985b61240..71035f4ee92 100644 --- a/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx +++ b/website/content/docs/templates/hcl_templates/functions/ipnet/cidrsubnets.mdx @@ -2,7 +2,7 @@ page_title: cidrsubnets function reference description: |- The `cidrsubnets` function calculates a sequence of consecutive IP address - ranges in a CIDR prefix. Learn how to use the `cidersubnets` function in Packer templates. + ranges in a CIDR prefix. --- # `cidrsubnets` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx index aa80d9a1d52..f3b806e7c79 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/abs.mdx @@ -1,6 +1,6 @@ --- page_title: abs function reference -description: The `abs` function returns the absolute value of the given number. Learn how to use the `abs` function in Packer templates. +description: The `abs` function returns the absolute value of the given number. --- # `abs` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx index e954977e1df..8034b0f4db5 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/ceil.mdx @@ -2,7 +2,7 @@ page_title: ceil function reference description: |- The `ceil` function returns the closest whole number greater than or equal to - the given value. Learn how to use the `ceil` function in Packer templates. + the given value. --- # `ceil` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx index b61e07f5ecc..574e6d61bfa 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/floor.mdx @@ -2,7 +2,7 @@ page_title: floor function reference description: |- The `floor` function returns the closest whole number less than or equal to - the given value. Learn how to use the `floor` function in Packer templates. + the given value. --- # `floor` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx index c21374d0dcc..591b50a441c 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/log.mdx @@ -1,6 +1,6 @@ --- page_title: log function reference -description: The `log` function returns the logarithm of a given number in a given base. Learn how to use the `log` function in Packer templates. +description: The `log` function returns the logarithm of a given number in a given base. --- # `log` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx index 34066bd2043..f35dc050a41 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/max.mdx @@ -1,6 +1,6 @@ --- page_title: max function reference -description: The `max` function returns the largest number from the given set of one or more numbers. Learn how to use the `max` function in Packer templates. +description: The `max` function returns the largest number from the given set of one or more numbers. --- # `max` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx index 31a8b2b47b2..4915ddd0d2c 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/min.mdx @@ -1,6 +1,6 @@ --- page_title: min function reference -description: The `min` function returns the smallest number in a set of one or more numbers. Learn how to use the `min` function in Packer templates. +description: The `min` function returns the smallest number in a set of one or more numbers. --- # `min` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx index e997a7717c3..4665b2919f2 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/parseint.mdx @@ -2,7 +2,7 @@ page_title: parseint function reference description: >- The `parseint` function parses the given string as a representation of an - integer. Learn how to use the `parseint` function in Packer templates. + integer. --- # `parseint` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx index 63743d62ed0..ca90688f6bb 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/pow.mdx @@ -1,6 +1,6 @@ --- page_title: pow function reference -description: The `pow` function raises a number to a power. Learn how to use the `pow` function in Packer templates. +description: The `pow` function raises a number to a power. --- # `pow` Function diff --git a/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx b/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx index 17bf2323ea1..d10002a387d 100644 --- a/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx +++ b/website/content/docs/templates/hcl_templates/functions/numeric/signum.mdx @@ -1,6 +1,6 @@ --- page_title: signum function reference -description: The `signum` function determines the sign of a number. Learn how to use the `signum` function in Packer templates. +description: The `signum` function determines the sign of a number. --- # `signum` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx b/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx index 47a13b06d0b..dd311a204ef 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/chomp.mdx @@ -1,6 +1,6 @@ --- page_title: chomp function reference -description: The `chomp` function removes newline characters at the end of a string. Learn how to use the `chomp` function in Packer templates. +description: The `chomp` function removes newline characters at the end of a string. --- # `chomp` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/format.mdx b/website/content/docs/templates/hcl_templates/functions/string/format.mdx index 569c0e3ab0f..3bfd9ee3a84 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/format.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/format.mdx @@ -1,7 +1,7 @@ --- page_title: format function reference description: |- - The `format` function applies a specification to format values and produce a new string. Learn how to use the `format` function in Packer templates. + The `format` function applies a specification to format values and produce a new string. --- # `format` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx b/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx index 8503de8c434..edf3284eabd 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/formatlist.mdx @@ -1,7 +1,7 @@ --- page_title: formatlist function reference description: |- - The `formatlist` function applies a specification to format values and produce a list of strings. Learn how to use the `formatlist` function in Packer templates. + The `formatlist` function applies a specification to format values and produce a list of strings. --- # `formatlist` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/indent.mdx b/website/content/docs/templates/hcl_templates/functions/string/indent.mdx index d68a7970b6a..d91428b7a4b 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/indent.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/indent.mdx @@ -2,7 +2,7 @@ page_title: indent function reference description: |- The `indent` function adds spaces to the beginnings of all but the - first line of a given multi-line string. Learn how to use the `indent` function in Packer templates. + first line of a given multi-line string. --- # `indent` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/join.mdx b/website/content/docs/templates/hcl_templates/functions/string/join.mdx index d8c4de04e00..149c874df5b 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/join.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/join.mdx @@ -2,7 +2,7 @@ page_title: join function reference description: |- The `join` function produces a string by concatenating the elements of a list - with a given delimiter. Learn how to use the `join` function in Packer templates. + with a given delimiter. --- # `join` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/lower.mdx b/website/content/docs/templates/hcl_templates/functions/string/lower.mdx index 39c3a5df7da..8815d01b344 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/lower.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/lower.mdx @@ -2,7 +2,7 @@ page_title: lower function reference description: >- The `lower` function converts all uppercase letters in the given string to - lowercase. Learn how to use the `lower` function in Packer templates. + lowercase. --- # `lower` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/regex.mdx b/website/content/docs/templates/hcl_templates/functions/string/regex.mdx index 6cce4356c04..6f00e4782ec 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regex.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regex.mdx @@ -2,7 +2,7 @@ page_title: regex function reference description: |- The `regex` function applies a regular expression to a string and returns the - matching substrings. Learn how to use the `regex` function in Packer templates. + matching substrings. --- # `regex` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx b/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx index cbfb66a682a..f5e02ec70bd 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regex_replace.mdx @@ -1,7 +1,7 @@ --- page_title: regex_replace function reference description: >- - The `regex_replace` function matches and replaces all occurrences of a substring with a replacement string. Learn how to use the `regex_replace` function in Packer templates. + The `regex_replace` function matches and replaces all occurrences of a substring with a replacement string. --- # `regex_replace` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx b/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx index 0e2d500f989..0a1f92a8537 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/regexall.mdx @@ -1,7 +1,7 @@ --- page_title: regexall function reference description: |- - The `regexall` function applies a regular expression to a string and returns a list of all matches. Learn how to use the `regexall` function in Packer templates. + The `regexall` function applies a regular expression to a string and returns a list of all matches. --- # `regexall` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/replace.mdx b/website/content/docs/templates/hcl_templates/functions/string/replace.mdx index 5ffd43ba35f..e430827c7be 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/replace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/replace.mdx @@ -1,7 +1,7 @@ --- page_title: replace function reference description: |- - The `replace` function replaces all occurrences of substring with a given string. Learn how to use the `replace` function in Packer templates. + The `replace` function replaces all occurrences of substring with a given string. --- # `replace` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/split.mdx b/website/content/docs/templates/hcl_templates/functions/string/split.mdx index eaa43d5372f..8ee3d578805 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/split.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/split.mdx @@ -1,7 +1,7 @@ --- page_title: split function reference description: |- - The `split` function divides the given string according to the specified separator to produce a list. Learn how to use the `split` function in Packer templates. + The `split` function divides the given string according to the specified separator to produce a list. --- # `split` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx b/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx index 2a1cfbbdc24..fec3f45224b 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/strcontains.mdx @@ -1,7 +1,7 @@ --- page_title: strcontains function reference description: |- - The `strcontains` function searches for a substring within a string. Learn how to use the `strcontains` function in Packer templates. + The `strcontains` function searches for a substring within a string. --- # `strcontains` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx b/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx index 49639de4f48..0b1c08b4456 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/strrev.mdx @@ -1,6 +1,6 @@ --- page_title: strrev function reference -description: The `strrev` function reverses a string. Learn how to use the `strrev` function in Packer templates. +description: The `strrev` function reverses a string. --- # `strrev` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/substr.mdx b/website/content/docs/templates/hcl_templates/functions/string/substr.mdx index 76693b463f5..d186768b5d2 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/substr.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/substr.mdx @@ -2,7 +2,7 @@ page_title: substr function reference description: |- The `substr` function extracts a substring from a given string using an offset and - length. Learn how to use the `substr` function in Packer templates. + length. --- # `substr` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/title.mdx b/website/content/docs/templates/hcl_templates/functions/string/title.mdx index 475e76581ec..37b6ce2e0d5 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/title.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/title.mdx @@ -2,7 +2,7 @@ page_title: title function reference description: |- The `title` function converts the first letter of each word in a given string - to uppercase. Learn how to use the `title` function in Packer templates. + to uppercase. --- # `title` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trim.mdx b/website/content/docs/templates/hcl_templates/functions/string/trim.mdx index e0e2408578a..bbd378953ee 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trim.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trim.mdx @@ -2,7 +2,7 @@ page_title: trim function reference description: |- The `trim` function removes the specified characters from the start and end of - a given string. Learn how to use the `trim` function in Packer templates. + a given string. --- # `trim` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx index bbe3b3af3bf..29ddb7df79e 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimprefix.mdx @@ -2,7 +2,7 @@ page_title: trimprefix function reference description: |- The `trimprefix` function removes the specified prefix from the start of a - given string. Learn how to use the `trimprefix` function in Packer templates. + given string. --- # `trimprefix` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx index 01fba86c3e8..22308139db9 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimspace.mdx @@ -2,7 +2,7 @@ page_title: trimspace function reference description: |- The `trimspace` function removes space characters from the start and end of - a given string. Learn how to use the `trimpsace` function in Packer templates. + a given string. --- # `trimspace` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx b/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx index ad17dcd5722..9c8ec3945dc 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/trimsuffix.mdx @@ -2,7 +2,7 @@ page_title: trimsuffix function reference description: |- The `trimsuffix` function removes the specified suffix from the end of a - given string. Learn how to use the `trimsuffix` function in Packer templates. + given string. --- # `trimsuffix` Function diff --git a/website/content/docs/templates/hcl_templates/functions/string/upper.mdx b/website/content/docs/templates/hcl_templates/functions/string/upper.mdx index 2219cc07367..62d83c51527 100644 --- a/website/content/docs/templates/hcl_templates/functions/string/upper.mdx +++ b/website/content/docs/templates/hcl_templates/functions/string/upper.mdx @@ -2,7 +2,7 @@ page_title: upper function reference description: >- The `upper` function converts all lowercase letters in the given string to - uppercase. Learn how to use the `upper` function in Packer templates. + uppercase. --- # `upper` Function diff --git a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx index be0190f7bc4..d05fe59de67 100644 --- a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx +++ b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv4.mdx @@ -1,6 +1,6 @@ --- page_title: uuidv4 function reference -description: The `uuidv4` function generates a unique string ID according to RFC 4122 version 4. Learn how to use the `uuidv4` function in Packer templates. +description: The `uuidv4` function generates a unique string ID according to RFC 4122 version 4. --- # `uuidv4` Function diff --git a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx index bcc5d15acb5..99940e1613c 100644 --- a/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx +++ b/website/content/docs/templates/hcl_templates/functions/uuid/uuidv5.mdx @@ -1,7 +1,7 @@ --- page_title: uuidv5 function reference description: |- - The `uuidv5` function generates a unique name-based ID for the value according to RFC 4122 version 5. Learn how to use the `uuidv5` function in Packer templates. + The `uuidv5` function generates a unique name-based ID for the value according to RFC 4122 version 5. --- # `uuidv5` Function From 4b45e151decf958fc833db3a59764828cf1fa016 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Thu, 30 Jan 2025 10:28:12 -0800 Subject: [PATCH 09/11] fixed typo in redirects --- website/redirects.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/redirects.js b/website/redirects.js index 26dd855139e..f3781b23ee7 100644 --- a/website/redirects.js +++ b/website/redirects.js @@ -95,7 +95,7 @@ module.exports = [ source: '/packer/docs/provisioners/custom', destination: '/packer/docs/plugins/creation/custom-provisioners', permanent: true, - } + }, /** * END EMPTY PAGE REDIRECTS */ From 0f30246355392cc1b887ff10b12081e0388f7a2e Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Thu, 30 Jan 2025 10:37:42 -0800 Subject: [PATCH 10/11] formatting error in page desc --- website/content/docs/datasources/hcp/hcp-packer-iteration.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx b/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx index a1bfc44744d..b28570bf879 100644 --- a/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx +++ b/website/content/docs/datasources/hcp/hcp-packer-iteration.mdx @@ -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 --- From 090b30e8a3863c76174cff8aa0a4be34cee42ca9 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Thu, 30 Jan 2025 11:01:36 -0800 Subject: [PATCH 11/11] fix missing partials --- website/content/docs/community-tools.mdx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/website/content/docs/community-tools.mdx b/website/content/docs/community-tools.mdx index 49909b8aa34..9b2c24aa386 100644 --- a/website/content/docs/community-tools.mdx +++ b/website/content/docs/community-tools.mdx @@ -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