Skip to content
🧪 The terragrunt-v1 docs are open for feedback! 🧪
This site will eventually replace the terragrunt.io site.
To give feedback on your experience with the new docs, 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