backport of commit 77e35b9216

This commit is contained in:
Wenfeng Pan
2024-08-13 18:01:57 +00:00
parent f589081fd8
commit b408cffd55
+2 -2
View File
@@ -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) {