github.com/hugorut/terraform@v1.1.3/website/docs/language/functions/textdecodebase64.mdx (about) 1 --- 2 page_title: textdecodebase64 - Functions - Configuration Language 3 description: >- 4 The textdecodebase64 function decodes a string that was previously 5 Base64-encoded, 6 7 and then interprets the result as characters in a specified character 8 encoding. 9 --- 10 11 # `textdecodebase64` Function 12 13 -> **Note:** This function is supported only in Terraform v0.14 and later. 14 15 `textdecodebase64` function decodes a string that was previously Base64-encoded, 16 and then interprets the result as characters in a specified character encoding. 17 18 Terraform uses the "standard" Base64 alphabet as defined in 19 [RFC 4648 section 4](https://tools.ietf.org/html/rfc4648#section-4). 20 21 The `encoding_name` argument must contain one of the encoding names or aliases 22 recorded in 23 [the IANA character encoding registry](https://www.iana.org/assignments/character-sets/character-sets.xhtml). 24 Terraform supports only a subset of the registered encodings, and the encoding 25 support may vary between Terraform versions. 26 27 Terraform accepts the encoding name `UTF-8`, which will produce the same result 28 as [`base64decode`](/language/functions/base64decode). 29 30 ## Examples 31 32 ``` 33 > textdecodebase64("SABlAGwAbABvACAAVwBvAHIAbABkAA==", "UTF-16LE") 34 Hello World 35 ``` 36 37 ## Related Functions 38 39 * [`textencodebase64`](/language/functions/textencodebase64) performs the opposite operation, 40 applying target encoding and then Base64 to a string. 41 * [`base64decode`](/language/functions/base64decode) is effectively a shorthand for 42 `textdecodebase64` where the character encoding is fixed as `UTF-8`.