Directories, workspaces, and stacks are often discussed as separate Terraform features. The more useful question is what each one isolates.
Directories isolate code. Each environment can have its own root module, backend, providers, and lifecycle.
Workspaces isolate state. The same Terraform configuration can create separate infrastructure by selecting a different state file.
Stacks isolate deployments. Components define infrastructure building blocks, while deployments provide environment-specific inputs and coordinate how those components are instantiated.
Understanding the isolation boundary changes how these tools are evaluated. The decision is no longer about feature preference. The decision becomes identifying what must remain independent and what can safely be shared.
This lesson walks through each model and explains the operational consequences of that choice.

