backport of commit 77e35b9216

backport/feature/add-base64gzip-function-support/forcibly-chief-toad
Wenfeng Pan 2 years ago
parent f589081fd8
commit b408cffd55

@ -44,9 +44,9 @@ var Base64GzipFunc = function.New(&function.Spec{
// Base64Gzip compresses a string with gzip and then encodes the result in
// Base64 encoding.
//
// Terraform uses the "standard" Base64 alphabet as defined in RFC 4648 section 4.
// Packer uses the "standard" Base64 alphabet as defined in RFC 4648 section 4.
//
// Strings in the Terraform language are sequences of unicode characters rather
// Strings in the Packer language are sequences of unicode characters rather
// than bytes, so this function will first encode the characters from the string
// as UTF-8, then apply gzip compression, and then finally apply Base64 encoding.
func Base64Gzip(str cty.Value) (cty.Value, error) {

Loading…
Cancel
Save