We are using terraform commands in multiple scripts inside multiple services and the output of these scripts are accessed either using files or AWS CloudWatch, thus what we see is a bunch of confusing colour characters spread across almost all the terraform output lines. I was hoping to disable those characters but the discussion threads on github are not very clear of what is the best way currently to disable colour output across all terraform commands (eg.: )
My question here is, how can I best solve this problem in September 2021? We are currently using terraform version 0.14.0 and will soon upgrade to version 1.x, so a solution w.r.t. both versions is preferable but if there is something only for 1.x, we can consider implementing it when upgrading.
1 Answer
terraform plan, terraform plan and terraform output support -no-color option in TF 1.x. For example:
terraform plan -no-color