TL;DR: `find_in_parent_folders` searches strictly UPWARD, never in the config's own directory. If the file sits beside the referencing config (a sibling, not an ancestor), the lookup traverses to the filesystem root and fails. Read siblings with a relative path instead.

```text
ERROR  Call to function "find_in_parent_folders" failed: ParentFileNotFoundError:
ERROR  Could not find a _environment.hcl in any of the parent folders of
ERROR  .../terraform/modules/applications/[app]/[module]/terragrunt.hcl.
ERROR  Cause: Traversed all the way to the root..
```

## Steps

1. Check where the target file actually lives relative to the referencing config.
   Expected: it's a sibling (same directory) or the referencing config is a non-unit template that shouldn't be parsed at all.
2. For a sibling, read it relatively:
   ```hcl
   locals {
     env = read_terragrunt_config("env.hcl")
   }
   ```
   A relative path resolves against the config file's own directory, so it holds wherever the command runs from.
   Expected: no `find_in_parent_folders` for sibling files.
3. For ancestors, keep `find_in_parent_folders("name.hcl")`.
   Expected: the lookup finds the file in a parent directory.
4. If the failure comes from discovery walking into non-unit template dirs, exclude those dirs from discovery or give them no parseable unit config.
   Expected: `run --all` no longer descends into templates.

## When this applies

- `ParentFileNotFoundError` naming a file that exists, but as a sibling of the referencing config.
- Discovery (`run --all`, stack operations) failing inside shared module template directories.

## When it doesn't apply

- The file is genuinely missing from all parents: create it or fix the name.
- `Include configuration not found`: that's an `include` path problem, different fix.

## Tool versions

All Terragrunt 1.x (rule verified on 1.1.3).

## Why it happens

The function starts at the PARENT of the referencing config and walks up. A sibling is never a parent, so the walk reaches the filesystem root and reports `ParentFileNotFoundError`. The idiom is usually copied from a root `include`, where upward search is correct.

## Edge cases

- `get_terragrunt_dir()`-anchored absolute paths (`"${get_terragrunt_dir()}/env.hcl"`) are the explicit equivalent for siblings.
- `find_in_parent_folders("name.hcl", "fallback.hcl")` with a fallback only helps when the file is missing, not when it's a sibling.