@@ -307,12 +307,11 @@ func decodeDependencies(ctx context.Context, pctx *ParsingContext, l log.Logger,
307307 l .Debugf ("Reading Terragrunt config file at %s" , util .RelPathForLog (pctx .RootWorkingDir , depPath , pctx .Writers .LogShowAbsPaths ))
308308 }
309309
310- _ , depCtx , err := pctx .WithConfigPath (l , depPath )
310+ _ , depCtx , err := pctx .WithDependencyConfigPath (l , depPath )
311311 if err != nil {
312312 return nil , err
313313 }
314314
315- depCtx .OriginalTerragruntConfigPath = depPath
316315 depCtx .DownloadDir = filepath .Join (filepath .Dir (depPath ), util .TerragruntCacheDir )
317316
318317 if depCtx .IAMRoleOptions != depCtx .OriginalIAMRoleOptions {
@@ -394,13 +393,11 @@ func checkForDependencyBlockCycles(ctx context.Context, pctx *ParsingContext, l
394393
395394 dependencyPath := getCleanedTargetConfigPath (dependency .ConfigPath .AsString (), configPath )
396395
397- l , dependencyContext , err := pctx .WithConfigPath (l , dependencyPath )
396+ l , dependencyContext , err := pctx .WithDependencyConfigPath (l , dependencyPath )
398397 if err != nil {
399398 return err
400399 }
401400
402- dependencyContext .OriginalTerragruntConfigPath = dependencyPath
403-
404401 if err := checkForDependencyBlockCyclesUsingDFS (ctx , dependencyContext , l , dependencyPath , & visitedPaths , & currentTraversalPaths ); err != nil {
405402 return err
406403 }
@@ -439,13 +436,11 @@ func checkForDependencyBlockCyclesUsingDFS(
439436 for _ , dependency := range dependencyPaths {
440437 dependencyPath := getCleanedTargetConfigPath (dependency , dependencyPath )
441438
442- l , dependencyContext , err := pctx .WithConfigPath (l , dependencyPath )
439+ l , dependencyContext , err := pctx .WithDependencyConfigPath (l , dependencyPath )
443440 if err != nil {
444441 return err
445442 }
446443
447- dependencyContext .OriginalTerragruntConfigPath = dependencyPath
448-
449444 if err := checkForDependencyBlockCyclesUsingDFS (ctx , dependencyContext , l , dependencyPath , visitedPaths , currentTraversalPaths ); err != nil {
450445 return err
451446 }
@@ -765,14 +760,12 @@ func getOutputJSONWithCaching(ctx context.Context, pctx *ParsingContext, l log.L
765760// by directly pulling down the state file. Otherwise, terragrunt will fallback to running `terragrunt output` on the
766761// target module.
767762func getTerragruntOutputJSON (ctx context.Context , pctx * ParsingContext , l log.Logger , targetConfig string ) ([]byte , error ) {
768- // Create dependency context using WithConfigPath
769- l , pctx , err := pctx .WithConfigPath (l , targetConfig )
763+ l , pctx , err := pctx .WithDependencyConfigPath (l , targetConfig )
770764 if err != nil {
771765 return nil , err
772766 }
773767
774768 // Set dependency-specific fields
775- pctx .OriginalTerragruntConfigPath = targetConfig
776769 pctx .ForwardTFStdout = false
777770 pctx .CheckDependentUnits = false
778771 pctx .TerraformCommand = "output"
0 commit comments