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] 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 9a1d34bba..8115f6ccd 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 e65b8218e..952126f6c 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 fceaf4a61..94e70d0ad 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 24788be4d..a80e5bc1a 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 95eed7272..ce7dbe6bb 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 1c41c3fb6..a558a5c08 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 96a68fa56..c55783de0 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 f9c92b89d..4304ff96d 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 fab4bd4f0..7a0b06053 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 a255719db..7a10a5716 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 40d3cdc97..fbe7d7bf5 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 3157b039f..c397d6fb7 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 b37cad99c..0b8f5c9e3 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 3a504a1f9..9a074eeec 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: