Terraform machine readable output

I’m running terraform CLI via node.js application and I want to be able to produce machine readable (json/yaml) log from terraform apply command.
I can’t seem to find an option to do it. Is it only possible to produce human readable logs from CLI commands?

Thanks for the help

Hi @dimkinv,

Indeed, at this time the progress information is available only in human-readable form.

If you save a plan to disk using terraform plan -out=tfplan then you can get a machine-readable description of that plan using terraform show -json tfplan which you could then potentially render in a different way or use for automatic analysis. But once you apply the plan, Terraform’s logs are only streamed in human-oriented text form.