I am submitting a hackathon project for team Reulan as a solo contributor.
Team Members: @mpmsimo
My goal for the hackathon was to take a deeper dive into the terraform-exec and understand how to invoke Terraform CLI from a Golang program. (while learning Golang!)
I’ve had an idea for quite some time now to have a CLI tool that scans multiple Terraform projects (or states) and reports Backend/Terraform information as well as if any drift is present in a easy to consume report.
Though the festive aspect is more so a secondary motivator to get the tool in a working state. For this Hackathon I figured to show my holiday spirits I would add an option to the drift report to simply make the output more festive via emojis!
This tool is currently in progress and is still being developed, but I was able to get a super super basic MVP completed yesterday. I have plans on finalizing report structure today and tomorrow.
Here is a very brief preview of what I am going for. This is just me grabbing information I find interesting and returning it as a report. I still need to implement the following:
- reporting to mediums other than Discord/STDOUT
- adding --festive CLI option to make the report pop out
- parallelization of the code so that it can plan multiple Terraform projects simultaneously.
I would like to format the following data in a easy to read table, but currently I am scraping most the values that I would like at the moment.
Also for what it’s worth, most of the coding I’ve for the hackathon recently on this project has been livestreamed on my Twitch channel under the title “Golang | Terraform Drift Detector”.
The code can be found here: reulan/clairvoyance
I should have another update and a video showing off a formatted report (even if it’s just for a single Terraform project) today or tomorrow before the end of the Hackathon.