cloudposse-archives / tfmask

Terraform utility to mask select output from `terraform plan` and `terraform apply`
https://cloudposse.com/accelerate
Apache License 2.0
202 stars 27 forks source link

error: bufio.Scanner: token too long #32

Open Dilergore opened 2 years ago

Dilergore commented 2 years ago

Hello,

I am seeing an issue for a base64 encoded cert value.

The error message is: error: bufio.Scanner: token too long

Is there a solution to this?

jritzinsight commented 2 years ago

Also having this issue - running 0.7.0

error: bufio.Scanner: token too long node:events:505 throw er; // Unhandled 'error' event ^ Error: write EPIPE at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16) Emitted 'error' event on Socket instance at: at emitErrorNT (node:internal/streams/destroy:157:8) at emitErrorCloseNT (node:internal/streams/destroy:122:3) at processTicksAndRejections (node:internal/process/task_queues:83:21) *** errno: -32, code: 'EPIPE', syscall: 'write'

jritzinsight commented 2 years ago

FYI - if anyone else comes across this open issue running into the bufio.Scanner: token too long error, there is an open PR fixing this issue in this repo located here: https://github.com/cloudposse/tfmask/pull/25

Fork this repo, enable GitHub Actions, and snag the patch from the above PR. Open a new PR in your forked repo with the changes in the above patch, merge it, and then cut a release and just bump the version to 0.7.1 or something. You can then grab the binary from your new release in your forked repo and use it. Works great; this is how we solved the issue for our use case.