@@ -85,16 +85,16 @@ func Run(ctx context.Context, opts *options.TerragruntOptions) error {
8585 return errors .New (MissingCommand {})
8686 }
8787
88- return runTerraform (ctx , opts , new (Target ))
88+ return run (ctx , opts , new (Target ))
8989}
9090
9191func RunWithTarget (ctx context.Context , opts * options.TerragruntOptions , target * Target ) error {
92- return runTerraform (ctx , opts , target )
92+ return run (ctx , opts , target )
9393}
9494
95- func runTerraform (ctx context.Context , terragruntOptions * options.TerragruntOptions , target * Target ) error {
95+ func run (ctx context.Context , terragruntOptions * options.TerragruntOptions , target * Target ) error {
9696 if terragruntOptions .TerraformCommand == tf .CommandNameVersion {
97- return tf . RunCommand (ctx , terragruntOptions , tf . CommandNameVersion )
97+ return runVersionCommand (ctx , terragruntOptions )
9898 }
9999
100100 // We need to get the credentials from auth-provider-cmd at the very beginning, since the locals block may contain `get_aws_account_id()` func.
@@ -907,3 +907,15 @@ func setTerragruntNullValues(terragruntOptions *options.TerragruntOptions, terra
907907func useLegacyNullValues () bool {
908908 return os .Getenv (useLegacyNullValuesEnvVar ) == "1"
909909}
910+
911+ func getTerragruntConfig (ctx context.Context , opts * options.TerragruntOptions ) (* config.TerragruntConfig , error ) {
912+ configCtx := config .NewParsingContext (ctx , opts ).WithDecodeList (
913+ config .TerragruntVersionConstraints , config .FeatureFlagsBlock )
914+
915+ // TODO: See if we should be ignore this lint error
916+ return config .PartialParseConfigFile ( //nolint: contextcheck
917+ configCtx ,
918+ opts .TerragruntConfigPath ,
919+ nil ,
920+ )
921+ }
0 commit comments