Skip to content

Commit 5a2fbb9

Browse files
committed
fix: Adding auth call during parse phase
1 parent cd5c666 commit 5a2fbb9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

internal/discovery/phase_parse.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import (
1010
"github.com/gruntwork-io/terragrunt/internal/configbridge"
1111
"github.com/gruntwork-io/terragrunt/internal/errors"
1212
"github.com/gruntwork-io/terragrunt/internal/filter"
13+
"github.com/gruntwork-io/terragrunt/internal/runner/run/creds"
1314
"github.com/gruntwork-io/terragrunt/internal/util"
1415
"github.com/gruntwork-io/terragrunt/pkg/config"
1516
"github.com/gruntwork-io/terragrunt/pkg/config/hclparse"
@@ -229,6 +230,10 @@ func parseComponent(
229230
parseOpts.TerragruntConfigPath = filepath.Join(parseOpts.WorkingDir, configFilename)
230231
parseOpts.OriginalTerragruntConfigPath = parseOpts.TerragruntConfigPath
231232

233+
if _, err := creds.ObtainCredsForParsing(ctx, l, parseOpts.AuthProviderCmd, parseOpts.Env, configbridge.ShellRunOptsFromOpts(parseOpts)); err != nil {
234+
return err
235+
}
236+
232237
ctx, parsingCtx := configbridge.NewParsingContext(ctx, l, parseOpts)
233238
parsingCtx = parsingCtx.WithDecodeList(
234239
config.TerraformSource,

0 commit comments

Comments
 (0)