# Functions
Base64Decode decodes a string containing a base64 sequence.
Base64Encode applies Base64 encoding to a string.
Base64Gzip compresses a string with gzip and then encodes the result in Base64 encoding.
Base64Sha256 computes the SHA256 hash of a given string and encodes it with Base64.
Base64Sha512 computes the SHA512 hash of a given string and encodes it with Base64.
Basename takes a string containing a filesystem path and removes all except the last portion from it.
Bcrypt computes a hash of the given string using the Blowfish cipher, returning a string in the Modular Crypt Format usually expected in the shadow password file on many Unix systems.
Ceil returns the closest whole number greater than or equal to the given value.
Chomp removes newline characters at the end of a string.
Chunklist splits a single list into fixed-size chunks, returning a list of lists.
CidrHost calculates a full host IP address within a given IP network address prefix.
CidrNetmask converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
CidrSubnet calculates a subnet address within a given IP network address prefix.
CidrSubnets calculates a sequence of consecutive subnet prefixes that may be of different prefix lengths under a common base prefix.
Coalesce takes any number of arguments and returns the first one that isn't empty.
CoalesceList takes any number of list arguments and returns the first one that isn't empty.
Compact takes a list of strings and returns a new list with any empty string elements removed.
Contains determines whether a given list contains a given single value as one of its elements.
Dirname takes a string containing a filesystem path and removes the last portion from it.
Distinct takes a list and returns a new list with any duplicate elements removed.
Element returns a single element from a given list at the given index.
File reads the contents of the file at the given path.
FileBase64 reads the contents of the file at the given path.
FileExists determines whether a file exists at the given path.
Flatten takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
Floor returns the closest whole number lesser than or equal to the given value.
Indent adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
Index finds the element index for a given value in a list.
Join concatenates together the string elements of one or more lists with a given separator.
Keys takes a map and returns a sorted list of the map keys.
Length returns the number of elements in the given collection or number of Unicode characters in the given string.
List takes any number of list arguments and returns a list containing those values in the same order.
Log returns returns the logarithm of a given number in a given base.
Lookup performs a dynamic lookup into a map.
MakeFileBase64Sha256Func constructs a function that is like Base64Sha256Func but reads the contents of a file rather than hashing a given literal string.
MakeFileBase64Sha512Func constructs a function that is like Base64Sha512Func but reads the contents of a file rather than hashing a given literal string.
MakeFileExistsFunc constructs a function that takes a path and determines whether a file exists at that path.
MakeFileFunc constructs a function that takes a file path and returns the contents of that file, either directly as a string (where valid UTF-8 is required) or as a string containing base64 bytes.
MakeFileMd5Func constructs a function that is like Md5Func but reads the contents of a file rather than hashing a given literal string.
MakeFileSha1Func constructs a function that is like Sha1Func but reads the contents of a file rather than hashing a given literal string.
MakeFileSha256Func constructs a function that is like Sha256Func but reads the contents of a file rather than hashing a given literal string.
MakeFileSha512Func constructs a function that is like Sha512Func but reads the contents of a file rather than hashing a given literal string.
MakeTemplateFileFunc constructs a function that takes a file path and an arbitrary object of named values and attempts to render the referenced file as a template using HCL template syntax.
MakeToFunc constructs a "to..." function, like "tostring", which converts its argument to a specific type or type kind.
Map takes an even number of arguments and returns a map whose elements are constructed from consecutive pairs of arguments.
Matchkeys constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
Md5 computes the MD5 hash of a given string and encodes it with hexadecimal digits.
Merge takes an arbitrary number of maps and returns a single map that contains a merged set of elements from all of the maps.
ParseInt parses a string argument and returns an integer of the specified base.
Pathexpand takes a string that might begin with a `~` segment, and if so it replaces that segment with the current user's home directory path.
Pow returns the logarithm of a given number in a given base.
Replace searches a given string for another given substring, and replaces all occurences with a given replacement string.
Reverse takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
RsaDecrypt decrypts an RSA-encrypted ciphertext, returning the corresponding cleartext.
SetProduct computes the cartesian product of sets or sequences.
Sha1 computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
Sha256 computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
Sha512 computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
Signum determines the sign of a number, returning a number between -1 and 1 to represent the sign.
Slice extracts some consecutive elements from within a list.
Sort re-orders the elements of a given list of strings so that they are in ascending lexicographical order.
Split divides a given string by a given separator, returning a list of strings containing the characters between the separator sequences.
TimeAdd adds a duration to a timestamp, returning a new timestamp.
Timestamp returns a string representation of the current date and time.
Title converts the first letter of each word in the given string to uppercase.
Transpose takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
TrimSpace removes any space characters from the start and end of the given string.
URLEncode applies URL encoding to a given string.
UUID generates and returns a Type-4 UUID in the standard hexadecimal string format.
UUIDV5 generates and returns a Type-5 UUID in the standard hexadecimal string format.
Values returns a list of the map values, in the order of the sorted keys.
Zipmap constructs a map from a list of keys and a corresponding list of values.
# Variables
AbsPathFunc constructs a function that converts a filesystem path to an absolute path.
Base64DecodeFunc constructs a function that decodes a string containing a base64 sequence.
Base64EncodeFunc constructs a function that encodes a string to a base64 sequence.
Base64GzipFunc constructs a function that compresses a string with gzip and then encodes the result in Base64 encoding.
Base64Sha256Func constructs a function that computes the SHA256 hash of a given string and encodes it with Base64.
Base64Sha512Func constructs a function that computes the SHA256 hash of a given string and encodes it with Base64.
BasenameFunc constructs a function that takes a string containing a filesystem path and removes all except the last portion from it.
BcryptFunc constructs a function that computes a hash of the given string using the Blowfish cipher.
CeilFunc contructs a function that returns the closest whole number greater than or equal to the given value.
ChompFunc constructions a function that removes newline characters at the end of a string.
ChunklistFunc constructs a function that splits a single list into fixed-size chunks, returning a list of lists.
CidrHostFunc contructs a function that calculates a full host IP address within a given IP network address prefix.
CidrNetmaskFunc contructs a function that converts an IPv4 address prefix given in CIDR notation into a subnet mask address.
CidrSubnetFunc contructs a function that calculates a subnet address within a given IP network address prefix.
CidrSubnetsFunc is similar to CidrSubnetFunc but calculates many consecutive subnet addresses at once, rather than just a single subnet extension.
CoalesceFunc constructs a function that takes any number of arguments and returns the first one that isn't empty.
CoalesceListFunc constructs a function that takes any number of list arguments and returns the first one that isn't empty.
CompactFunc constructs a function that takes a list of strings and returns a new list with any empty string elements removed.
ContainsFunc constructs a function that determines whether a given list or set contains a given single value as one of its elements.
DirnameFunc constructs a function that takes a string containing a filesystem path and removes the last portion from it.
DistinctFunc constructs a function that takes a list and returns a new list with any duplicate elements removed.
No description provided by the author
FlattenFunc constructs a function that takes a list and replaces any elements that are lists with a flattened sequence of the list contents.
FloorFunc contructs a function that returns the closest whole number lesser than or equal to the given value.
IndentFunc constructions a function that adds a given number of spaces to the beginnings of all but the first line in a given multi-line string.
IndexFunc constructs a function that finds the element index for a given value in a list.
No description provided by the author
KeysFunc constructs a function that takes a map and returns a sorted list of the map keys.
No description provided by the author
ListFunc constructs a function that takes an arbitrary number of arguments and returns a list containing those values in the same order.
LogFunc contructs a function that returns the logarithm of a given number in a given base.
LookupFunc constructs a function that performs dynamic lookups of map types.
MapFunc constructs a function that takes an even number of arguments and returns a map whose elements are constructed from consecutive pairs of arguments.
MatchkeysFunc constructs a function that constructs a new list by taking a subset of elements from one list whose indexes match the corresponding indexes of values in another list.
Md5Func constructs a function that computes the MD5 hash of a given string and encodes it with hexadecimal digits.
MergeFunc constructs a function that takes an arbitrary number of maps and returns a single map that contains a merged set of elements from all of the maps.
ParseIntFunc contructs a function that parses a string argument and returns an integer of the specified base.
PathExpandFunc constructs a function that expands a leading ~ character to the current user's home directory.
PowFunc contructs a function that returns the logarithm of a given number in a given base.
ReplaceFunc constructions a function that searches a given string for another given substring, and replaces each occurence with a given replacement string.
ReverseFunc takes a sequence and produces a new sequence of the same length with all of the same elements as the given sequence but in reverse order.
RsaDecryptFunc constructs a function that decrypts an RSA-encrypted ciphertext.
SetProductFunc calculates the cartesian product of two or more sets or sequences.
Sha1Func contructs a function that computes the SHA1 hash of a given string and encodes it with hexadecimal digits.
Sha256Func contructs a function that computes the SHA256 hash of a given string and encodes it with hexadecimal digits.
Sha512Func contructs a function that computes the SHA512 hash of a given string and encodes it with hexadecimal digits.
SignumFunc contructs a function that returns the closest whole number greater than or equal to the given value.
SliceFunc constructs a function that extracts some consecutive elements from within a list.
No description provided by the author
No description provided by the author
TimeAddFunc constructs a function that adds a duration to a timestamp, returning a new timestamp.
TimestampFunc constructs a function that returns a string representation of the current date and time.
TitleFunc constructions a function that converts the first letter of each word in the given string to uppercase.
TransposeFunc contructs a function that takes a map of lists of strings and TransposeFunc constructs a function that takes a map of lists of strings and swaps the keys and values to produce a new map of lists of strings.
TrimSpaceFunc constructions a function that removes any space characters from the start and end of the given string.
URLEncodeFunc constructs a function that applies URL encoding to a given string.
No description provided by the author
No description provided by the author
ValuesFunc constructs a function that returns a list of the map values, in the order of the sorted keys.
ZipmapFunc constructs a function that constructs a map from a list of keys and a corresponding list of values.