From 953c814ad508d7b2478397c34f730146ca0139c8 Mon Sep 17 00:00:00 2001 From: trujillo-adam Date: Tue, 28 Jan 2025 11:22:54 -0800 Subject: [PATCH] crypto and collection functions references --- .../hcl_templates/functions/collection/alltrue.mdx | 6 +++--- .../hcl_templates/functions/collection/anytrue.mdx | 6 +++--- .../hcl_templates/functions/collection/chunklist.mdx | 6 +++--- .../hcl_templates/functions/collection/coalesce.mdx | 5 ++--- .../hcl_templates/functions/collection/coalescelist.mdx | 5 ++--- .../hcl_templates/functions/collection/compact.mdx | 4 ++-- .../hcl_templates/functions/collection/concat.mdx | 4 ++-- .../hcl_templates/functions/collection/contains.mdx | 4 ++-- .../hcl_templates/functions/collection/distinct.mdx | 4 ++-- .../hcl_templates/functions/collection/element.mdx | 4 ++-- .../hcl_templates/functions/collection/flatten.mdx | 4 ++-- .../hcl_templates/functions/collection/index-fn.mdx | 4 ++-- .../templates/hcl_templates/functions/collection/keys.mdx | 4 ++-- .../hcl_templates/functions/collection/length.mdx | 4 ++-- .../hcl_templates/functions/collection/lookup.mdx | 4 ++-- .../hcl_templates/functions/collection/merge.mdx | 5 ++--- .../hcl_templates/functions/collection/range.mdx | 4 ++-- .../hcl_templates/functions/collection/reverse.mdx | 4 ++-- .../functions/collection/setintersection.mdx | 8 +++----- .../hcl_templates/functions/collection/setproduct.mdx | 6 +++--- .../hcl_templates/functions/collection/setunion.mdx | 5 ++--- .../hcl_templates/functions/collection/slice.mdx | 4 ++-- .../templates/hcl_templates/functions/collection/sort.mdx | 5 ++--- .../hcl_templates/functions/collection/values.mdx | 4 ++-- .../hcl_templates/functions/collection/zipmap.mdx | 6 +++--- .../templates/hcl_templates/functions/crypto/bcrypt.mdx | 6 +++--- .../docs/templates/hcl_templates/functions/crypto/md5.mdx | 6 +++--- .../hcl_templates/functions/crypto/rsadecrypt.mdx | 4 ++-- .../templates/hcl_templates/functions/crypto/sha1.mdx | 6 +++--- .../templates/hcl_templates/functions/crypto/sha256.mdx | 6 +++--- .../templates/hcl_templates/functions/crypto/sha512.mdx | 6 +++--- 31 files changed, 73 insertions(+), 80 deletions(-) diff --git a/website/content/docs/templates/hcl_templates/functions/collection/alltrue.mdx b/website/content/docs/templates/hcl_templates/functions/collection/alltrue.mdx index 3d5db2743..498eacc23 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/alltrue.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/alltrue.mdx @@ -1,8 +1,8 @@ --- -page_title: alltrue - Functions - Configuration Language +page_title: alltrue function reference description: |- - The alltrue function determines whether all elements of a collection - are true or "true". If the collection is empty, it returns true. + The `alltrue` function returns `true` if all elements in a collection + are `true`, `"true"`, or if the collection is empty. Learn how to use the `alltrue` function in Packer templates. --- # `alltrue` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/anytrue.mdx b/website/content/docs/templates/hcl_templates/functions/collection/anytrue.mdx index fb67069bd..020d6eb26 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/anytrue.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/anytrue.mdx @@ -1,8 +1,8 @@ --- -page_title: anytrue - Functions - Configuration Language +page_title: anytrue function reference description: |- - The anytrue function determines whether any element of a collection - is true or "true". If the collection is empty, it returns false. + The `anytrue` function returns `true` if any element of a collection + is `true` or `"true"`. Learn how to use the `anytrue` function in Packer templates. --- # `anytrue` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/chunklist.mdx b/website/content/docs/templates/hcl_templates/functions/collection/chunklist.mdx index 66658bfcd..cea128442 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/chunklist.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/chunklist.mdx @@ -1,8 +1,8 @@ --- -page_title: chunklist - Functions - Configuration Language +page_title: chunklist function reference description: |- - The chunklist function splits a single list into fixed-size chunks, returning - a list of lists. + The `chunklist` function splits a single list into fixed-size chunks and returns + a list of lists. Learn how to use the `chunklist` function in Packer templates. --- # `chunklist` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx b/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx index f46673c49..d18b20311 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/coalesce.mdx @@ -1,8 +1,7 @@ --- -page_title: coalesce - Functions - Configuration Language +page_title: coalesce function reference description: |- - The coalesce function takes any number of arguments and returns the - first one that isn't null nor empty. + The `coalesce` function returns the first argument that is not empty or `null` from a list of arguments. Learn to use the `coalesce` function in Packer templates. --- # `coalesce` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx b/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx index 79d9d85c8..ea13ccb5c 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/coalescelist.mdx @@ -1,8 +1,7 @@ --- -page_title: coalescelist - Functions - Configuration Language +page_title: coalescelist function reference description: |- - The coalescelist function takes any number of list arguments and returns the - first one that isn't empty. + The `coalescelist` function returns the first non-empty argument in a list of arguments. Learn how to use the `coalescelist` function in Packer templates. --- # `coalescelist` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/compact.mdx b/website/content/docs/templates/hcl_templates/functions/collection/compact.mdx index df8b79e75..4938aace0 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/compact.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/compact.mdx @@ -1,6 +1,6 @@ --- -page_title: compact - Functions - Configuration Language -description: The compact function removes empty string elements from a list. +page_title: compact function reference +description: The `compact` function removes empty string elements from a list. Learn how to use the `compact` function in Packer templates. --- # `compact` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/concat.mdx b/website/content/docs/templates/hcl_templates/functions/collection/concat.mdx index 318b72fa0..365485fce 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/concat.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/concat.mdx @@ -1,6 +1,6 @@ --- -page_title: concat - Functions - Configuration Language -description: The concat function combines two or more lists into a single list. +page_title: concat function reference +description: The `concat` function combines two or more lists into a single list. Learn how to use the `concat` function in Packer templates. --- # `concat` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/contains.mdx b/website/content/docs/templates/hcl_templates/functions/collection/contains.mdx index 43cdd5c5d..f9892128c 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/contains.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/contains.mdx @@ -1,6 +1,6 @@ --- -page_title: contains - Functions - Configuration Language -description: The contains function determines whether a list or set contains a given value. +page_title: contains function reference +description: The `contains` function determines whether a list or set contains a given value. Learn how to use the `contains` function in Packer templates. --- # `contains` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/distinct.mdx b/website/content/docs/templates/hcl_templates/functions/collection/distinct.mdx index 28fe7a448..33dec1e1e 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/distinct.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/distinct.mdx @@ -1,6 +1,6 @@ --- -page_title: distinct - Functions - Configuration Language -description: The distinct function removes duplicate elements from a list. +page_title: distinct function reference +description: The `distinct` function removes duplicate elements from a list. Learn how to use the `distince` function in Packer templates. --- # `distinct` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/element.mdx b/website/content/docs/templates/hcl_templates/functions/collection/element.mdx index 6373cc394..178ecaf4d 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/element.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/element.mdx @@ -1,6 +1,6 @@ --- -page_title: element - Functions - Configuration Language -description: The element function retrieves a single element from a list. +page_title: element function reference +description: The `element` function retrieves a single element from a list. Learn how to use the `element` function in Packer templates. --- # `element` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx b/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx index a3bc2f442..9aca98a0b 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/flatten.mdx @@ -1,6 +1,6 @@ --- -page_title: flatten - Functions - Configuration Language -description: The flatten function eliminates nested lists from a list. +page_title: flatten function reference +description: The `flatten` function eliminates nested lists from a list. Learn how to use the `flatten` function in Packer templates. --- # `flatten` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx b/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx index 80c80ca05..e3d134301 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/index-fn.mdx @@ -1,6 +1,6 @@ --- -page_title: index - Functions - Configuration Language -description: The index function finds the element index for a given value in a list. +page_title: index function reference +description: The `index` function finds the element index for a given value in a list. Learn how to use the `index` function in Packer templates. --- # `index` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx b/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx index cd955f9df..5c9161389 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/keys.mdx @@ -1,6 +1,6 @@ --- -page_title: keys - Functions - Configuration Language -description: The keys function returns a list of the keys in a given map. +page_title: keys function reference +description: The `keys` function returns a list of keys in a given map. Learn how to use the `key` function in Packer templates. --- # `keys` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/length.mdx b/website/content/docs/templates/hcl_templates/functions/collection/length.mdx index 71eacc8dc..8fafc7c25 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/length.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/length.mdx @@ -1,6 +1,6 @@ --- -page_title: length - Functions - Configuration Language -description: The length function determines the length of a collection or string. +page_title: length function reference +description: The `length` function determines the length of a collection or string. Learn how to use the `length` function in Packer templates. --- # `length` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx b/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx index 0eb686063..f56f7dcb4 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/lookup.mdx @@ -1,6 +1,6 @@ --- -page_title: lookup - Functions - Configuration Language -description: The lookup function retrieves an element value from a map given its key. +page_title: lookup function reference +description: The `lookup` function retrieves an element value from a map using the map key. Learn how to use the `lookup` function in Packer templates. --- # `lookup` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/merge.mdx b/website/content/docs/templates/hcl_templates/functions/collection/merge.mdx index e6ac8b7a6..19c24d5cb 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/merge.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/merge.mdx @@ -1,8 +1,7 @@ --- -page_title: merge - Functions - Configuration Language +page_title: merge function reference description: |- - The merge function takes an arbitrary number of maps and returns a single - map after merging the keys from each argument. + The `merge` function returns a single map by merging the keys in multiple maps. Learn how to use the `merge` function in Packer templates. --- # `merge` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/range.mdx b/website/content/docs/templates/hcl_templates/functions/collection/range.mdx index 9ddf0af0e..fe326dd5a 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/range.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/range.mdx @@ -1,6 +1,6 @@ --- -page_title: range - Functions - Configuration Language -description: The range function generates sequences of numbers. +page_title: range function reference +description: The `range` function generates sequences of numbers. Learn how to use the `range` function in Packer templates. --- # `range` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx b/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx index 743a97a5d..b844e6a71 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/reverse.mdx @@ -1,6 +1,6 @@ --- -page_title: reverse - Functions - Configuration Language -description: The reverse function reverses a sequence. +page_title: reverse function reference +description: The `reverse` function reverses the values in a sequence. Learn how to use the `reverse` function in Packer templates. --- # `reverse` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx b/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx index 924b9a8b0..94411508a 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/setintersection.mdx @@ -1,16 +1,14 @@ --- -page_title: setintersection - Functions - Configuration Language +page_title: setintersection function reference description: |- - The setintersection function takes multiple sets and produces a single set - containing only the elements that all of the given sets have in common. + The `setintersection` function creates one set from multiple sets that contains only elements common to all input sets. Learn how to use `setintersection` in Packer templates. --- # `setintersection` Function The `setintersection` function takes multiple sets and produces a single set containing only the elements that all of the given sets have in common. -In other words, it computes the -[intersection]() of the sets. +The new set is referred to as the _intersection_. ```hcl setintersection(sets...) diff --git a/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx b/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx index d9425f120..6ccea5cfc 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/setproduct.mdx @@ -1,8 +1,8 @@ --- -page_title: setproduct - Functions - Configuration Language +page_title: setproduct function reference description: |- - The setproduct function finds all of the possible combinations of elements - from all of the given sets by computing the cartesian product. + The `setproduct` function finds all possible combinations of elements + from the given sets. Learn how to use the `setproduct` function in Packer templates. --- # `setproduct` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx b/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx index a78e2d489..1a429627d 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/setunion.mdx @@ -1,8 +1,7 @@ --- -page_title: setunion - Functions - Configuration Language +page_title: setunion function reference description: |- - The setunion function takes multiple sets and produces a single set - containing the elements from all of the given sets. + The `setunion` function creates one set containing the elements from multiple given sets. Learn how to use the `setunion` function in Packer templates. --- # `setunion` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx b/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx index f92ebc2ea..f230f4351 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/slice.mdx @@ -1,6 +1,6 @@ --- -page_title: slice - Functions - Configuration Language -description: The slice function extracts some consecutive elements from within a list. +page_title: slice function reference +description: The `slice` function extracts consecutive elements from a list. Learn how to use the `slice` function in Packer templates. --- # `slice` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/sort.mdx b/website/content/docs/templates/hcl_templates/functions/collection/sort.mdx index edc3dd99f..78a55cbe3 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/sort.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/sort.mdx @@ -1,8 +1,7 @@ --- -page_title: sort - Functions - Configuration Language +page_title: sort function reference description: |- - The sort function takes a list of strings and returns a new list with those - strings sorted lexicographically. + The `sort` function returns a new lexicographically sorted list from a list of strings. Learn how to use the `sort` function in Packer templates. --- # `sort` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/values.mdx b/website/content/docs/templates/hcl_templates/functions/collection/values.mdx index 0fced24da..445cfdba4 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/values.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/values.mdx @@ -1,6 +1,6 @@ --- -page_title: values - Functions - Configuration Language -description: The values function returns a list of the element values in a given map. +page_title: values function reference +description: The `values` function returns a list of the element values in a given map. Learn how to use the `values` function in Packer templates. --- # `values` Function diff --git a/website/content/docs/templates/hcl_templates/functions/collection/zipmap.mdx b/website/content/docs/templates/hcl_templates/functions/collection/zipmap.mdx index fbdcb6a75..a3ae79553 100644 --- a/website/content/docs/templates/hcl_templates/functions/collection/zipmap.mdx +++ b/website/content/docs/templates/hcl_templates/functions/collection/zipmap.mdx @@ -1,8 +1,8 @@ --- -page_title: zipmap - Functions - Configuration Language +page_title: zipmap function reference description: |- - The zipmap function constructs a map from a list of keys and a corresponding - list of values. + The `zipmap` function constructs a map from a list of keys and a corresponding + list of values. Learn how to use the `zipmap` function in Packer templates. --- # `zipmap` Function diff --git a/website/content/docs/templates/hcl_templates/functions/crypto/bcrypt.mdx b/website/content/docs/templates/hcl_templates/functions/crypto/bcrypt.mdx index c49779c2c..f7e6ceff0 100644 --- a/website/content/docs/templates/hcl_templates/functions/crypto/bcrypt.mdx +++ b/website/content/docs/templates/hcl_templates/functions/crypto/bcrypt.mdx @@ -1,8 +1,8 @@ --- -page_title: bcrypt - Functions - Configuration Language +page_title: bcrypt function reference description: |- - The bcrypt function computes a hash of the given string using the Blowfish - cipher. + The `bcrypt` function computes a hash of the given string using the Blowfish + cipher. Learn how to use the `bcrypt` function in Packer templates. --- # `bcrypt` Function diff --git a/website/content/docs/templates/hcl_templates/functions/crypto/md5.mdx b/website/content/docs/templates/hcl_templates/functions/crypto/md5.mdx index f777aa65d..0db691adf 100644 --- a/website/content/docs/templates/hcl_templates/functions/crypto/md5.mdx +++ b/website/content/docs/templates/hcl_templates/functions/crypto/md5.mdx @@ -1,8 +1,8 @@ --- -page_title: md5 - Functions - Configuration Language +page_title: md5 function reference description: |- - The md5 function computes the MD5 hash of a given string and encodes it - with hexadecimal digits. + The `md5` function computes the MD5 hash of a given string and encodes it + with hexadecimal digits. Learn how to use the `md5` function in Packer templates. --- # `md5` Function diff --git a/website/content/docs/templates/hcl_templates/functions/crypto/rsadecrypt.mdx b/website/content/docs/templates/hcl_templates/functions/crypto/rsadecrypt.mdx index 59339c651..7e4a5ad84 100644 --- a/website/content/docs/templates/hcl_templates/functions/crypto/rsadecrypt.mdx +++ b/website/content/docs/templates/hcl_templates/functions/crypto/rsadecrypt.mdx @@ -1,6 +1,6 @@ --- -page_title: rsadecrypt - Functions - Configuration Language -description: The rsadecrypt function decrypts an RSA-encrypted message. +page_title: rsadecrypt function reference +description: The `rsadecrypt` function decrypts an RSA-encrypted message. Learn how to usethe `rsadecrypt` function in Packer templates. --- # `rsadecrypt` Function diff --git a/website/content/docs/templates/hcl_templates/functions/crypto/sha1.mdx b/website/content/docs/templates/hcl_templates/functions/crypto/sha1.mdx index a001654fa..c0cc5cd63 100644 --- a/website/content/docs/templates/hcl_templates/functions/crypto/sha1.mdx +++ b/website/content/docs/templates/hcl_templates/functions/crypto/sha1.mdx @@ -1,8 +1,8 @@ --- -page_title: sha1 - Functions - Configuration Language +page_title: sha1 function reference description: |- - The sha1 function computes the SHA1 hash of a given string and encodes it - with hexadecimal digits. + The `sha1` function computes the SHA1 hash of a given string and encodes it + with hexadecimal digits. Learn how to use the `sha1` function in Packer templates. --- # `sha1` Function diff --git a/website/content/docs/templates/hcl_templates/functions/crypto/sha256.mdx b/website/content/docs/templates/hcl_templates/functions/crypto/sha256.mdx index 06133dba3..3abec6bb5 100644 --- a/website/content/docs/templates/hcl_templates/functions/crypto/sha256.mdx +++ b/website/content/docs/templates/hcl_templates/functions/crypto/sha256.mdx @@ -1,8 +1,8 @@ --- -page_title: sha256 - Functions - Configuration Language +page_title: sha256 function reference description: |- - The sha256 function computes the SHA256 hash of a given string and encodes it - with hexadecimal digits. + The `sha256` function computes the SHA256 hash of a given string and encodes it + with hexadecimal digits. Learn how to use the `sha256` function in Packer templates. --- # `sha256` Function diff --git a/website/content/docs/templates/hcl_templates/functions/crypto/sha512.mdx b/website/content/docs/templates/hcl_templates/functions/crypto/sha512.mdx index 3d58ecf90..3a8cfeaca 100644 --- a/website/content/docs/templates/hcl_templates/functions/crypto/sha512.mdx +++ b/website/content/docs/templates/hcl_templates/functions/crypto/sha512.mdx @@ -1,8 +1,8 @@ --- -page_title: sha512 - Functions - Configuration Language +page_title: sha512 function reference description: |- - The sha512 function computes the SHA512 hash of a given string and encodes it - with hexadecimal digits. + The `sha512` function computes the SHA512 hash of a given string and encodes it + with hexadecimal digits. Learn how to use the `sha512` function in Packer templates. --- # `sha512` Function