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