Well, this has been a bit of a rabbit hole. I published Part 1 here and thought I would quickly smash out the rest of the posts around it. Alas I got carried away and managed to get an MVP that is a bit rough round the edges but seems to function well. So without further ado here is part 2 - where I plan to detail using the persistent top level flags in conjunction with viper
and how I approached the scanning of Terraform files.
Flags Precedence
I wanted to be able to be very flexible with flags in my application and have multiple ways to define them to fit the various use cases. The flow should be: