lifeomic / terraform-plan-parser

Command line utility and JavaScript API for parsing stdout from "terraform plan" and converting it to JSON.
MIT License
149 stars 16 forks source link

Parse terraform show output #23

Open scgodbold opened 5 years ago

scgodbold commented 5 years ago

It seems like this could be useful for automation as the stored plan objects are needed to ensure a consistent state is applied. Failure is caused by the lack of leading and trailing character sequences that are only emitted at the time the plan is first ran.

For now I have worked around this by doing:

echo "\nTerraform will perform the following actions:\n $(terraform show -no-color tfplan) \nPlan:" | parse-terraform-plan
captn3m0 commented 5 years ago

+1 for this.

@scgodbold Thanks for the workaround