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