Open invidian opened 5 years ago
Call to function "base64decode" failed: the result of decoding the the provided string is not valid UTF-8.``` same issue here.
Thank you for your continued interest in this issue.
Terraform version 1.8 launches with support of provider-defined functions. It is now possible to implement your own functions! We would love to see this implemented as a provider-defined function.
Please see the provider-defined functions documentation to learn how to implement functions in your providers. If you are new to provider development, learn how to create a new provider with the Terraform Plugin Framework. If you have any questions, please visit the Terraform Plugin Development category in our official forum.
We hope this feature unblocks future function development and provides more flexibility for the Terraform community. Thank you for your continued support of Terraform!
Terraform Version
Terraform Configuration Files
Expected Behavior
Terraform should output
foo = f620de7923eeec8c3f29e6579f386c5d104febec
.Actual Behavior
base64decode
function call fails.Steps to Reproduce
terraform init
terraform apply
Additional Context
In Terraform 0.11.X, it was possible to chain
base64decode()
withsha1()
and other checksum functions. This gave the ability to hash binary data, like SSH public keys to calculate values forSSHFP
records, which seems like a perfectly valid use case. With version 0.12.X this is no longer possible.I am aware of #21669, but maybe it would be possible to restore this functionality somehow, for instance with function like
sha1base64
, which would take base64-encoded data as an input, decode it inside Go and return SHA1 to the user.References