Disable terraform colour output - Sep 2021

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.

3

1 Answer

terraform plan, terraform plan and terraform output support -no-color option in TF 1.x. For example:

terraform plan -no-color

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like