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

Add ability to parse presanitized text #24

Open scgodbold opened 5 years ago

scgodbold commented 5 years ago

This is in reference to #23 I opened earlier this week. I had some free time and figured I would take a stab at it. It attempts to add the ability to parse pre-sanitized input such as what terraform show provides. This helps enable use in automation as it is best to store your plan objects to assure a consistent apply occurs.

The idea being that passing a --clean flag to the parser tells it that only resource changes will be listed. Doing this there is no need to substring the plan to extract the changing resources.

coveralls commented 5 years ago

Pull Request Test Coverage Report for Build 112


Totals Coverage Status
Change from base Build 103: 0.0%
Covered Lines: 171
Relevant Lines: 171

💛 - Coveralls
Druotic commented 5 years ago

Thanks for the contribution @scgodbold! Overall, this looks great to me and your use-case sounds like a valid case to me. Just a minor comment on the test helpers. I'll add a couple of other reviewers so we can get this merged soon.