Repository: gruntwork-io/terragrunt (language: go)

Issue:
$TERRAGRUNT_INCLUDE_DIR env variable seems not support glob curly braces
## Describe the bug

Hello 👋

First, thanks for all you work on this awesome project 👍

I found a strange behavior with `$TERRAGRUNT_INCLUDE_DIR` environment variable, it does not seem to take into account curly braces in unix style globs, but using `--terragrunt-include-dir` seems working correctly.

FYI, using wildcards with env variable is working.

Is this behavior normal ?

## Steps To Reproduce

```bash
TERRAGRUNT_INCLUDE_DIR="gcloud/{project-1,project-2}" terragrunt run-all init
```

Results with an empty output :

```bash
14:56:01.853 INFO   The stack at . will be processed in the following order for command init:
```

## Expected behavior

```bash
14:57:58.123 INFO   The stack at . will be processed in the following order for command init:
Group 1
- Module ./gcloud/project-1
- Module ./gcloud/project-2
```

## Versions

- Terragrunt version: 0.68.0
- OpenTofu/Terraform version: 1.9.7
- Environment details (Ubuntu 20.04, Windows 10, etc.): Linux EOS 6.6.52-1-lts



Discussion / hints:
Hello,
use `,` to separate values passed through env variables
```
TERRAGRUNT_INCLUDE_DIR="gcloud/project-1,gcloud/project-2" terragrunt run-all init
```
@denis256 Thanks for the workaround, but is it normal for the variable and the argument to function differently?
At the very least, the difference should be documented if they aren't (I haven't looked through the docs to confirm this).

Given that the workaround is fairly simple, I'm going to mark this issue as requesting community contributions, and marking it as `preserved` so that the issue doesn't go stale.

This is where flag splitting occurs, and where folks should start looking if they'd like to contribute a fix for this:
https://github.com/gruntwork-io/terragrunt/blob/af89a982c98d50d8a0015016c70f311462d5c57f/pkg/cli/slice_flag.go#L162

Fix patch:
diff --git a/docs/_docs/04_reference/cli-options.md b/docs/_docs/04_reference/cli-options.md
index 00fbfd25d7..85b1a59069 100644
--- a/docs/_docs/04_reference/cli-options.md
+++ b/docs/_docs/04_reference/cli-options.md
@@ -1008,6 +1008,9 @@ excluded during execution of the commands. If a relative path is specified, it s
 [--terragrunt-working-dir](#terragrunt-working-dir). Flag can be specified multiple times. This will only exclude the
 module, not its dependencies.
 
+Please note that the glob curly braces expansion is not taken in account using environment variable unlike of its equivalent as a parameter on the command line.
+You should consider using `TERRAGRUNT_EXCLUDE_DIR="foo/module,bar/module"` instead of `TERRAGRUNT_EXCLUDE_DIR="{foo,bar}/module"`.
+
 ### terragrunt-include-dir
 
 **CLI Arg**: `--terragrunt-include-dir`<br/>
@@ -1020,6 +1023,9 @@ Unix-style glob of directories to include when running `*-all` commands. Only mo
 dependent modules) will be included during execution of the commands. If a relative path is specified, it should be
 relative from `--terragrunt-working-dir`. Flag can be specified multiple times.
 
+Please note that the glob curly braces expansion is not taken in account using environment variable unlike of its equivalent as a parameter on the command line.
+You should consider using `TERRAGRUNT_INCLUDE_DIR="foo/module,bar/module"` instead of `TERRAGRUNT_INCLUDE_DIR="{foo,bar}/module"`.
+
 ### terragrunt-strict-include
 
 **CLI Arg**: `--terragrunt-strict-include`<br/>


Test patch: