github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/website/docs/language/functions/base64gzip.html.md (about)

     1  ---
     2  layout: "language"
     3  page_title: "base64gzip - Functions - Configuration Language"
     4  sidebar_current: "docs-funcs-encoding-base64gzip"
     5  description: |-
     6    The base64encode function compresses the given string with gzip and then
     7    encodes the result in Base64.
     8  ---
     9  
    10  # `base64gzip` Function
    11  
    12  `base64gzip` compresses a string with gzip and then encodes the result in
    13  Base64 encoding.
    14  
    15  Terraform uses the "standard" Base64 alphabet as defined in
    16  [RFC 4648 section 4](https://tools.ietf.org/html/rfc4648#section-4).
    17  
    18  Strings in the Terraform language are sequences of unicode characters rather
    19  than bytes, so this function will first encode the characters from the string
    20  as UTF-8, then apply gzip compression, and then finally apply Base64 encoding.
    21  
    22  While we do not recommend manipulating large, raw binary data in the Terraform
    23  language, this function can be used to compress reasonably sized text strings
    24  generated within the Terraform language. For example, the result of this
    25  function can be used to create a compressed object in Amazon S3 as part of
    26  an S3 website.
    27  
    28  ## Related Functions
    29  
    30  * [`base64encode`](./base64encode.html) applies Base64 encoding _without_
    31    gzip compression.
    32  * [`filebase64`](./filebase64.html) reads a file from the local filesystem
    33    and returns its raw bytes with Base64 encoding.