← projects
// project

Terradrift

Terraform configuration drift reconciliation tool.

Go · Devops · IaCrepo ↗

Terradrift is a cli tool written in Go, with the purpose of identifying configuration drift withing cloud environments. Original MVP designed for my Masters Project. Original implementation is limited to Google Cloud Platform, but is extensible for additional providers.

Configuration Drift arises because ad-hoc changes are made outside outside of IAC configuration, typically through the admin console or via cli. This can lead towards undocumented changes and unmanaged resources, leading to failed future deployments, and excess billing. Terradrift assists with identifying unmanaged resources, to improve operational stability and cost-savings.

How it works

Traditionally, Terraform connects to your cloud platform, and maintains state in a local file structure. When changes are made, this creates a disconnect between its local state and real state. While Terraform has built-in tooling to assist with identifying changes, it still relies on identifiers located within the local tfstate files. This means that if a new resource is created externally, it is left undocumented.

Terradrift rectifies this by directly parsing the cloud platform via API, and parsing the Terraform HCL code during each run. Without a reliance on local state, it is able to track identify mistmatches directly, catching conflicts at the source.

Notes

While Terradrift is fully intended to be a public project, it is currently in-progress and subject to grading for my Masters. The repo linked in the description will be made public shortly v