Skip to content
👷 The Terragrunt website redesign is Work In Progress! 👷
For a list of outstanding TODOs see this.
To give feedback, click here.

generate

Usage

Generate a stack of units based on configurations in a terragrunt.stack.hcl file.

Examples

Generate a stack of units using the configurations in a terragrunt.stack.hcl file.

Terminal window
terragrunt stack generate

Generating a stack

terragrunt.stack.hcl
unit "mother" {
source = "units/chicken"
path = "mother"
}
unit "father" {
source = "./units/chicken"
path = "father"
}
unit "chick_1" {
source = "./units/chick"
path = "chicks/chick-1"
}
unit "chick_2" {
source = "units/chick"
path = "chicks/chick-2"
}

Running the following:

Terminal window
terragrunt stack generate

Generates the following stack:

  • terragrunt.stack.hcl
  • Directory.terragrunt-stack
    • Directorymother
      • terragrunt.hcl
    • Directoryfather
      • terragrunt.hcl
    • Directorychicks
      • Directorychick-1
        • terragrunt.hcl
      • Directorychick-2
        • terragrunt.hcl