@@ -408,16 +408,19 @@ func HandleYamlProjectGeneration(config *DiggerConfigYaml, terraformDir string,
408408 workflow = b .Workflow
409409 }
410410
411- tgParsingConfig := TerragruntParsingConfig {
412- CreateProjectName : true ,
413- DefaultWorkflow : workflow ,
414- WorkflowFile : b .WorkflowFile ,
415- FilterPath : path .Join (terraformDir , * b .RootDir ),
416- AwsRoleToAssume : b .AwsRoleToAssume ,
417- AwsCognitoOidcConfig : b .AwsCognitoOidcConfig ,
411+ // load the parsing config and override the block values
412+ tgParsingConfig := b .TerragruntParsingConfig
413+ if tgParsingConfig == nil {
414+ tgParsingConfig = & TerragruntParsingConfig {}
418415 }
419-
420- err := hydrateDiggerConfigYamlWithTerragrunt (config , tgParsingConfig , terraformDir )
416+ tgParsingConfig .CreateProjectName = true
417+ tgParsingConfig .DefaultWorkflow = workflow
418+ tgParsingConfig .WorkflowFile = b .WorkflowFile
419+ tgParsingConfig .FilterPath = path .Join (terraformDir , * b .RootDir )
420+ tgParsingConfig .AwsRoleToAssume = b .AwsRoleToAssume
421+ tgParsingConfig .AwsCognitoOidcConfig = b .AwsCognitoOidcConfig
422+
423+ err := hydrateDiggerConfigYamlWithTerragrunt (config , * tgParsingConfig , terraformDir )
421424 if err != nil {
422425 slog .Error ("failed to hydrate config with terragrunt" ,
423426 "error" , err ,
0 commit comments