Skip to content

Path Expressions

Match units and stacks by their file system path.

Terminal window
# Relative paths
terragrunt find --filter './envs/prod/apps/app1'
terragrunt find --filter './envs/stage/**'
# Absolute paths
terragrunt find --filter '/absolute/path/to/envs/dev/apps/*'
# Wrapped paths (useful for explicitly indicating that this is a path expression)
terragrunt find --filter '{./envs/prod/apps/app2}'
  • Directoryenvs
    • Directoryprod
      • Directoryapps
        • Directoryapp1 <— Matched by the first filter
          • terragrunt.hcl
        • Directoryapp2 <— Matched by the fourth filter
          • terragrunt.hcl
    • Directorystage
      • Directoryapps
        • Directoryapp1 <— Matched by the second filter
          • terragrunt.hcl
        • Directoryapp2 <— Also matched by the second filter
          • terragrunt.hcl
    • Directorydev
      • Directoryapps
        • Directoryapp1 <— Matched by the third filter
          • terragrunt.hcl
        • Directoryapp2 <— Also matched by the third filter
          • terragrunt.hcl