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

Issue:
TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE updates wrong option in code
**Describe the bug**
The `TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE` / `--terragrunt-fetch-dependency-output-from-state` flag updates `opts.UsePartialParseConfigCache` instead of `FetchDependencyOutputFromState`

**To Reproduce**

Set `TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE=1` and start seeing cache hit/miss debug logs.

**Expected behavior**

Flag enables the right feature.

**Nice to have**
- [ ] Terminal output
- [ ] Screenshots

**Versions**
- Terragrunt version: 0.50.9
- Terraform version: v1.5.6
- Environment details (Ubuntu 20.04, Windows 10, etc.): Ubuntu 22.04

**Additional context**

https://github.com/gruntwork-io/terragrunt/blob/7d4c2b3cb9e79727d1da93af87466a519003b38e/cli/commands/flags.go#L200-L205


Discussion / hints:

Fix patch:
diff --git a/cli/commands/flags.go b/cli/commands/flags.go
index e06cdc23ce..56fc053569 100644
--- a/cli/commands/flags.go
+++ b/cli/commands/flags.go
@@ -199,7 +199,7 @@ func NewGlobalFlags(opts *options.TerragruntOptions) cli.Flags {
 		},
 		&cli.BoolFlag{
 			Name:        FlagNameTerragruntFetchDependencyOutputFromState,
-			Destination: &opts.UsePartialParseConfigCache,
+			Destination: &opts.FetchDependencyOutputFromState,
 			EnvVar:      "TERRAGRUNT_FETCH_DEPENDENCY_OUTPUT_FROM_STATE",
 			Usage:       "The option fetchs dependency output directly from the state file instead of init dependencies and running terraform on them.",
 		},


Test patch:
diff --git a/test/integration_test.go b/test/integration_test.go
index f4c5a88503..90acfae711 100644
--- a/test/integration_test.go
+++ b/test/integration_test.go
@@ -4721,12 +4721,13 @@ func TestTerragruntOutputFromRemoteState(t *testing.T) {
 		stderr bytes.Buffer
 	)
 
-	runTerragruntRedirectOutput(t, fmt.Sprintf("terragrunt run-all output --terragrunt-fetch-dependency-output-from-state --terragrunt-non-interactive --terragrunt-working-dir %s", environmentPath), &stdout, &stderr)
+	runTerragruntRedirectOutput(t, fmt.Sprintf("terragrunt run-all output --terragrunt-fetch-dependency-output-from-state --terragrunt-non-interactive --terragrunt-log-level debug --terragrunt-working-dir %s", environmentPath), &stdout, &stderr)
 	output := stdout.String()
 
 	assert.True(t, strings.Contains(output, "app1 output"))
 	assert.True(t, strings.Contains(output, "app2 output"))
 	assert.True(t, strings.Contains(output, "app3 output"))
+	assert.False(t, strings.Contains(stderr.String(), "terraform output -json"))
 
 	assert.True(t, (strings.Index(output, "app3 output") < strings.Index(output, "app1 output")) && (strings.Index(output, "app1 output") < strings.Index(output, "app2 output")))
 }