---
version: "v1.0.4"
category: "experiments-updated"
---

#### `stack-dependencies` - Separate filenames for unit vs stack autoincludes

Generated autoinclude files now use distinct filenames depending on the component kind, so tooling (LSP, `read_terragrunt_config()`, indexers) can identify a file's purpose from its name alone:

- **Unit-level autoincludes** continue to be written as `terragrunt.autoinclude.hcl`.
- **Stack-level autoincludes** (autoinclude blocks declared inside a `stack { ... }`) are now written as `terragrunt.autoinclude.stack.hcl`. The `.stack.hcl` suffix mirrors `terragrunt.stack.hcl`, matching the convention used elsewhere for stack files.

```hcl
# terragrunt.stack.hcl
unit "app" {
  source = "../catalog/units/app"
  path   = "app"

  autoinclude {
    # Generated as: .terragrunt-stack/app/terragrunt.autoinclude.hcl
    dependency "vpc" { config_path = unit.vpc.path }
  }
}

stack "networking" {
  source = "../catalog/stacks/networking"
  path   = "networking"

  autoinclude {
    # Generated as: .terragrunt-stack/networking/terragrunt.autoinclude.stack.hcl
    dependency "shared" { config_path = unit.shared.path }
  }
}
```

This change implements the naming convention proposed in the [Stack Dependencies RFC](https://github.com/gruntwork-io/terragrunt/issues/5663) so configurations for units and stacks always live in files whose names clearly indicate their purpose.

To learn more, see the [experiment documentation](/reference/experiments/active#stack-dependencies).
