TL;DR: Your `generate` block targets `versions.tf`, but the module you're consuming ships its own `versions.tf`, and `overwrite_terragrunt` refuses to clobber a file it didn't write. Don't switch to `overwrite` (it silently deletes the module's constraints); scope the generate block so it doesn't fire for modules that bring their own, or drop the generate in favor of the module's file.

```text
ERROR: The file path .../versions.tf already exists and was not generated by terragrunt.
```

## Steps

1. Confirm the collision: the error names the path; check the module source for a `versions.tf` it ships.
   Expected: the module (e.g. a terraform-aws-modules package) contains its own `versions.tf`.
2. Pick one:
   - If the module's pins are acceptable: stop generating `versions.tf` for that unit (condition the `generate` block or move it out of the shared config).
   - If you must enforce your pins: generate to a differently-named file is NOT enough (only one `required_providers` per module); instead constrain via the module call or a version constraint the module honors.
   Expected: exactly one source of `required_providers` per unit.
3. Re-run.
   Expected: the error is gone and `tofu init`/`terraform init` resolves providers.

## When this applies

- A `generate` block with `if_exists = "overwrite_terragrunt"` (or `error`) targets a filename the module also ships.
- Common with `versions.tf`, `provider.tf`, `backend.tf` injected from a root config.

## When it doesn't apply

- You WROTE the existing file by hand and want Terragrunt's version: that's what `overwrite_terragrunt` is for; check the file's signature comment to see why Terragrunt doesn't recognize it (e.g. `disable_signature = true` was used).

## Tool versions

All Terragrunt 1.x.

## Why it happens

`overwrite_terragrunt` replaces a file only if Terragrunt generated it (recognized by its signature comment). A module's own `versions.tf` was written by a human upstream, so Terragrunt stops rather than silently deleting someone else's version pins.

## Edge cases

- `if_exists = "skip"` makes the error go away but silently disables your pin wherever the module ships the file; the inconsistency is invisible.
- `if_exists = "overwrite"` deletes the module's constraints entirely, and you must then redeclare every provider the module needs and track module updates yourself.