Back to Terragrunt

Fast Copy

docs/src/data/strict-controls/fast-copy.mdx

1.0.4747 B
Original Source

Switches include_in_copy and exclude_from_copy pattern matching from zglob to gobwas/glob when Terragrunt copies a module's source folder.

fast-copy - Reason

The default implementation runs zglob once per pattern and recursively re-expands every directory match, which can dominate copy time on large module sources. gobwas compiles each pattern once and matches inline during the existing copy walk.

gobwas does not collapse ** when a neighbor is a wildcard, so a/**/*.tf matches a/sub/main.tf but not a/main.tf. Patterns that depended on zero-depth ** collapsing need brace alternation like {*.tf,**/*.tf} to cover both depths.