Managing Terraform resource drift using the GitOps method
summary
Explains using GitOps built with Flux and the tf-controller to run Terraform reconciliation inside Kubernetes: it pulls Terraform code from GitLab, compares the tfstate (kept as a Kubernetes secret) against actual AWS resources, and runs terraform plan/apply to correct drifts. Shows a demo where an EC2 tag deleted manually is detected and automatically restored, and describes deployment modes (detection-only, hybrid, full lifecycle) plus an ecosystem of ~2,500 providers and ~11,500 modules supporting detect-and-reconcile workflows.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:34Before automation
- 3:13Advantages of Infrastructure as Code
- 4:19Terraform, a reference tool
- 4:47Terraform's contributions
- 5:36Terraform workflow
- 6:24Terraform resource drifts
- 9:07What would be the ideal solution?
- 13:03Several possible GitOps models
- 16:35How does the controller work?
related talks
26mManaging Terraform resource drift with the GitOps approach
27mHow to Achieve (Actual) GitOps with Terraform and Flux
24mTerraform Best Practices
15mTerraform, GitOps & Kubernetes: manage infrastructure & aas
30mHow and When to Flux your Terraform
39mEnhance Your Kubernetes Experience with GitOps & Flux
26mGitOps Lifecycle Management
07mTalk Deep Dive
