# \[TEAM\] - Reulan

**URL:** <https://discuss.hashicorp.com/t/team-reulan/19347>\
**Category:** HashiCraft Holidays Hackstravaganza\
**Created:** [January 4, 2021, 1:30am UTC](https://discuss.hashicorp.com/t/team-reulan/19347 "2021-01-04T01:30:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpmsimo](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mpmsimo/32/16553_2.png) [@mpmsimo](https://discuss.hashicorp.com/u/mpmsimo)\
**Post date:** [January 4, 2021, 1:30am UTC](https://discuss.hashicorp.com/t/team-reulan/19347/1 "2021-01-04T01:30:34Z")

</div>

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](https://github.com/hashicorp/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.  
 ![clairvoyanceSingleProject](https://global.discourse-cdn.com/hashicorp/original/3X/b/c/bc77e912b85993b52ddc1778e82bfc5398775aaa.png)

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](https://www.twitch.tv/reulan) under the title “Golang | Terraform Drift Detector”.

The code can be found here: [reulan/clairvoyance](https://github.com/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.

---

<div class="post-metadata">

**Author:** ![mpmsimo](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mpmsimo/32/16553_2.png) [@mpmsimo](https://discuss.hashicorp.com/u/mpmsimo)\
**Post date:** [January 4, 2021, 12:45pm UTC](https://discuss.hashicorp.com/t/team-reulan/19347/2 "2021-01-04T12:45:38Z")

</div>

I’ve expanded the tool to allow for better reporting to Standard Out.

To add some holiday spirit and cheer, the tool now has Emoji + ASCII art display in addition the formatted drift report.

Didn’t quite get it able to send to Discord in the way I want.

Things to do still:

- parallelize (goroutines)
- support writing of `out.tfplan` file
- support parsing of `main.tf` to grab version used  
among others…

I have a few Terraform projects specified and I am able to see the:

- project name (relative dir path)
- version (version of Terraform binary used with terraform-exec) [I know this is misleading and should be version used by project]
- Resources Changed (add/change/destroy)
- Summary (brief description on what’s going on)

Here is a screenshot showing today’s progress!

 ![clairvoyanceToStdout2](https://global.discourse-cdn.com/hashicorp/original/3X/a/e/ae1787f0e56c3698a9ac0f97c80e5c2921f79f1e.png)

---

<div class="post-metadata">

**Author:** ![mpmsimo](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/mpmsimo/32/16553_2.png) [@mpmsimo](https://discuss.hashicorp.com/u/mpmsimo)\
**Post date:** [January 5, 2021, 7:15am UTC](https://discuss.hashicorp.com/t/team-reulan/19347/3 "2021-01-05T07:15:03Z")

</div>

Hey again!

I’ve been able to add few features to the tool today, but it’s still very much a work in progress before it can be stably and reliably used as a drift detector. Though I’ll likely add to this tool over time now that I’ve gotten over the initial hurdle.

I have uploaded a video going over how I use `clairvoyance` locally to generate a Drift Report at a glance.

[![](https://global.discourse-cdn.com/hashicorp/original/3X/2/4/24c63f86db977241c52b1a11b5ac4737ba9d0af1.jpeg "clairvoyance Terraform Drift Detector (HashiCraft Holiday Hackstravaganza submission)") ](https://www.youtube.com/watch?v=p5ozPq2QEZE)

Hope you can find the tool as amusing as I do!

**Personal links:**  
[twitch.tv/reulan](https://www.twitch.tv/reulan) (hackathon progress livecoded as “Golang | Terraform Drift Detector”)  
[reulan/clairvoyance](https://github.com/reulan/clairvoyance) (source code on GitHub)  
[reulan.com](https://reulan.com) (more about me!)

---

<div class="post-metadata">

**Author:** ![nic](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/nic/32/706_2.png) [@nic](https://discuss.hashicorp.com/u/nic)\
**Post date:** [January 5, 2021, 4:26pm UTC](https://discuss.hashicorp.com/t/team-reulan/19347/4 "2021-01-05T16:26:21Z")

</div>

This is brilliant, I have been wanting to dig into this myself. Your Twitch show looks great too.
