> Markdown version of [/videos/100694-from-monolith-to-phases-restructuring-terraform-deployments-that-work-in-any-cloud](https://www.wearedevelopers.com/videos/100694-from-monolith-to-phases-restructuring-terraform-deployments-that-work-in-any-cloud). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # From Monolith to Phases: Restructuring Terraform Deployments That Work in Any Cloud Your Terraform monolith is not too big, it is just too tightly coupled. Learn how splitting state files into six sequential phases eliminates slow plans and shrinks your blast radius. - **Speakers:** [Naveen Kumar Kalapala](https://www.wearedevelopers.com/@naveen-kumar-kalapala) - **Event:** Conference India 2026 - **Published:** November 25, 2026 - **Duration:** 34:26 - **URL:** https://www.wearedevelopers.com/videos/100694-from-monolith-to-phases-restructuring-terraform-deployments-that-work-in-any-cloud - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/551528cff90a53ba2857b117e74a4030/thumbnails/thumbnail.jpg?time=30000ms ## Summary When a single app service configuration edit triggers a full refresh of your entire cloud platform, the underlying issue isn't codebase size—"your Terraform monolith isn't too big, it's tightly coupled." Naveen Kumar Kalapala (Infosys Ltd) explains how storing unrelated resources in a single state file creates a massive blast radius, slow plans, tangled dependency graphs, blocked provider upgrades, and blurred team ownership. To resolve this within an enterprise Azure landing zone, Naveen restructured the monolithic estate into six sequential phases—networking, security, data and AI, app services, ETL and backup, and monitoring—giving each sub-phase an isolated state backend. State boundaries were drawn using three tests: rate of change, clear resource ownership, and one-way dependency flow. Rather than pretending dependencies don't exist, downstream phases reference upstream resources via Terraform data sources and strict naming conventions, while existing unmanaged resources are onboarded cleanly using Terraform 1.5+ `import.tf` blocks and Azure Verified Modules (AVM). In the CI/CD pipeline, changes pass through IaC security scanners (Checkov, Trivy, tfsec, GitHub Advanced Security) before plans are stored as immutable artifacts for review and execution, while Azure Policy enforces subscription-level guardrails at apply time. Because decomposition introduces new orchestration overhead and shared module files across environments make sandbox testing mandatory, teams must treat state splitting as a deliberate trade-off designed to establish clear ownership boundaries across any cloud provider. **Keywords:** terraform state decomposition, monolithic infrastructure as code, phased terraform deployments, azure landing zones, azure verified modules, terraform state locking, infrastructure blast radius, terraform import blocks, terraform data sources, ci/cd plan artifacts, azure policy guardrails, github advanced security, iac security scanning, terraform provider upgrades, cloud infrastructure ownership, sandbox environment testing ## Chapters 1. **Identifying tight coupling in monolithic Terraform state files** (00:32) — Small configuration changes in a monolithic Terraform state trigger slow platform-wide refreshes because unrelated resources are tightly coupled in a single state file. 1. **Evaluating the five risks of coupled Terraform estates** (05:55) — Coupled Terraform states increase blast radius, slow down plans, tangle dependency graphs, block provider upgrades, and blur resource ownership across teams. 1. **Transitioning from a single state to resource-based phases** (09:39) — Splitting a shared state file into separate states for networking, security, data, and applications isolates frequent application updates from stable foundational infrastructure. 1. **Drawing state boundaries using rate of change and ownership** (11:34) — Effective state boundaries are determined by evaluating resource rate of change, assigning clear team ownership, and enforcing one-way dependency flows for independent recovery. 1. **Structuring deployment phases and shared environment repositories** (15:31) — Organizing Terraform repositories into six sequential phases with environment-specific backend configurations requires dedicated sandbox testing because module files are shared across environments. 1. **Managing cross-phase dependencies and importing existing resources** (19:49) — Data sources link resources across separate state files using strict naming conventions, while Terraform 1.5 import blocks bring existing infrastructure under state management. 1. **Enforcing CI/CD plan artifacts and Azure Policy guardrails** (23:48) — Storing reviewed Terraform plans as pipeline artifacts prevents unverified changes, though Azure Policy guardrails can still block non-compliant resource deployments during the apply stage. 1. **Navigating friction with Azure Verified Modules and security tools** (26:46) — Adopting Azure Verified Modules, GitHub Advanced Security, and platform policies standardizes baselines and catches secrets but introduces friction during resource imports and deployments. 1. **Weighing decomposition trade-offs and clarifying multi-cloud ownership** (29:07) — Decomposing Terraform monoliths across Azure or AWS reduces blast radius and clarifies team ownership boundaries at the cost of increased pipeline orchestration and contract maintenance. ## Related Moments - [Managing Terraform state and automating CI/CD pipelines](https://www.wearedevelopers.com/videos/3-terraform-for-developers) (from "Terraform for Developers") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/800e2467cb31ffe4dee514fdaf0112f7/thumbnails/thumbnail.jpg?time=117845ms - [Evaluating cloud ecosystem dominance and securing Terraform state backends](https://www.wearedevelopers.com/videos/531-implementing-feature-environments-with-aws-and-terraform) (from "Implementing Feature Environments with AWS and Terraform") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/8ba846bba209b265c81a15d3d97263b4/thumbnails/thumbnail.jpg?time=265400ms - [Managing environmental components via Terraform core architecture](https://www.wearedevelopers.com/videos/887-building-applications-with-infrastructure-as-code) (from "Building Applications with Infrastructure as Code") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/17722be93d497eada7f023ec77d60bea/thumbnails/thumbnail.jpg?time=162995ms - [Best practices for writing and maintaining Terraform code](https://www.wearedevelopers.com/videos/1221-infrastructure-as-code-the-developer-s-secret-weapon) (from "Infrastructure as Code: The Developer's Secret Weapon") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/f1ce6517b310df440d0f0d056b899672/thumbnails/thumbnail.jpg?time=52285ms - [Structuring Terraform with Packer, Docker, and Kubernetes](https://www.wearedevelopers.com/videos/3-terraform-for-developers) (from "Terraform for Developers") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/800e2467cb31ffe4dee514fdaf0112f7/thumbnails/thumbnail.jpg?time=117845ms - [Managing deployments with Kubernetes and Terraform self-healing](https://www.wearedevelopers.com/videos/531-implementing-feature-environments-with-aws-and-terraform) (from "Implementing Feature Environments with AWS and Terraform") - **Thumbnail URL:** https://customer-goifxnzhrq3d0d54.cloudflarestream.com/8ba846bba209b265c81a15d3d97263b4/thumbnails/thumbnail.jpg?time=265400ms ## Related Articles - [Your Rollback Plan is Too Slow and How to Fix It](https://www.wearedevelopers.com/magazine/794-your-rollback-plan-is-too-slow-and-how-to-fix-it) - [How We Built a Worry-Free System That Runs for 10+ Years – And What We’d Do Again](https://www.wearedevelopers.com/magazine/751-how-we-built-a-worry-free-system-that-runs-for-10-years-and-what-we-d-do-again) - [The Geometry of Incidents: Connecting User Impact to Architecture](https://www.wearedevelopers.com/magazine/764-the-geometry-of-incidents-connecting-user-impact-to-architecture) - [Infer Once, Run Everywhere: Zero-Token Architecture](https://www.wearedevelopers.com/magazine/783-infer-once-run-everywhere-zero-token-architecture) ## Related Jobs - [Senior Cloud Security Engineer](https://www.wearedevelopers.com/jobs/ext/4659625-senior-cloud-security-engineer) at **GitHub** - [Senior Cloud Security Engineer](https://www.wearedevelopers.com/jobs/ext/4693925-senior-cloud-security-engineer) at **GitHub** - [Senior Software Engineer, Compute Platform](https://www.wearedevelopers.com/jobs/ext/4623664-senior-software-engineer-compute-platform) at **GitHub** - [Solutions Architect - Manager](https://www.wearedevelopers.com/jobs/ext/4893765-solutions-architect-manager) at **PwC** - [Staff Software Engineer, Compute Platform](https://www.wearedevelopers.com/jobs/ext/4911465-staff-software-engineer-compute-platform) at **GitHub** - [Principal Engineer, Cloud Security](https://www.wearedevelopers.com/jobs/ext/4819953-principal-engineer-cloud-security) at **Twilio**