The Terraform language and protocols consider
strings to be unicode and thus requires strings
arriving via wire protocols to be UTF-8 encoded,
so unfortunately it's by design that non-UTF-8
strings cannot be returned here, but since this
seems to just be general progress output emitted
by the provisioner, it is probably okay for the
provisioner to pre-sanitize these strings to replace
non-UTF-8 sequences with the replacement
character so that the rest of the message is still
readable.
… UTF-8. Closes #139.
Summary
As per https://github.com/hashicorp/terraform/issues/22856#issuecomment-533300018, relevant bit:
This PR attempts to fix the problem.