---
version: "v1.0.1"
category: "experiments-added"
---

#### `stack-dependencies` — Dependency wiring between units in stacks

A new `stack-dependencies` experiment enables the `autoinclude` block in `terragrunt.stack.hcl` files, allowing units and stacks to define dependency relationships and arbitrary configuration overrides during stack generation. This implements [RFC #5663](https://github.com/gruntwork-io/terragrunt/issues/5663).

```hcl
unit "vpc" {
  source = "../catalog/units/vpc"
  path   = "vpc"
}

unit "app" {
  source = "../catalog/units/app"
  path   = "app"

  autoinclude {
    dependency "vpc" {
      config_path = unit.vpc.path
    }

    inputs = {
      vpc_id = dependency.vpc.outputs.vpc_id
    }
  }
}
```

```bash
terragrunt run --all --experiment stack-dependencies -- plan
```

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