3 Untracked Resources at 2 AM: 6 Engineering Decisions for Terraform Drift Detection and Remediation

Overview At 2 AM on a Wednesday, my on-call phone buzzed during a shift at a mobility platform. The alert channel lit up with a Prometheus notification — the production ALB (Application Load Balancer) showed abnormal traffic distribution. One backend ECS instance had its weight suddenly set to 0, even though the machine was alive and healthy. Investigation revealed: someone had manually modified the ALB listener rule through the cloud console the previous day, setting one ECS instance’s weight from 50 to 0....

October 23, 2026 · 32 mins · 6706 words · Xu Baojin

When Your Self-Hosted Terraform Backend Cracks at 30 Engineers: 6 Engineering Decisions and a TCO Ledger from Moving to HCP Terraform

Overview Monday stand-up, our platform engineering team at a mobility platform was reviewing last week’s incidents: 17 state lock conflicts, two production environments broken by a “helpful” colleague running apply manually, and one set of credentials sitting in plaintext in CI logs. The root cause wasn’t a single operator error—it was our self-hosted Terraform backend (Git repo + S3 state bucket + DynamoDB lock + hand-made CI scripts) that had stopped holding up once the team grew from 5 to 30 engineers....

October 7, 2026 · 40 mins · 8382 words · ABao

3,000 Lines of HCL Nobody Dares to Touch? 5 Production Decisions and Migration Pitfalls of Redoing IaC in a Real Programming Language with Pulumi

Overview A team has been running Terraform for three years. Their main module has grown to 3,000 lines of HCL, with deeply nested variable definitions, multiple providers, and for_each loops that make code review a nightmare. Every change is like defusing a bomb—the pull request gets reviewed five times, tested in three environments, and the final plan output scrolls for 200+ lines before anyone clicks apply. The last guy who understood the module structure left two months ago, and the handover doc is an abandoned Notion page....

September 17, 2026 · 16 mins · 3398 words · Xu Baojin

Don't Turn Terraform Modules Into Black Boxes: IaC Layered Design Decisions and 6 Production Anti-Patterns Broken Down

Overview Last year I was setting up an IaC system for an e-commerce client. When I took over, their Terraform codebase looked roughly like this: three environments (dev/staging/prod), each with its own copy of the configuration, totaling over 3,000 lines—90% of which was copy-paste. Changing a VPC CIDR meant editing three files in sync. Miss one, and you get environment drift. The worst part: a security group rule was missing in prod for three months without anyone noticing....

August 15, 2026 · 17 mins · 3529 words · ABao

Don't Get Fooled by Multi-Cloud: Architecture Decisions and Lessons from Vendor Lock-in to Cross-Cloud Disaster Recovery

Overview At 3 AM, your phone vibrates. An alert message: a major cloud provider’s East China region storage service is experiencing widespread unavailability. Your core business is fully deployed in this region, with the primary database there too. The outage has lasted 12 minutes, customers are complaining, and your boss is asking “how long to recover” in the group chat. You know the truth: the cross-region disaster recovery plan was reviewed six months ago but got cut due to “high costs....

July 25, 2026 · 7 mins · 1475 words · ABaoPlus