Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Use credentials cache #153

Merged
merged 1 commit into from
Aug 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ func Configure(logger hclog.Logger, providerConfig interface{}) (schema.ClientMe
opts.ExternalID = &account.ExternalID
})
}
awsCfg.Credentials = stscreds.NewAssumeRoleProvider(sts.NewFromConfig(awsCfg), account.RoleARN, opts...)
provider := stscreds.NewAssumeRoleProvider(sts.NewFromConfig(awsCfg), account.RoleARN, opts...)
awsCfg.Credentials = aws.NewCredentialsCache(provider)
case account.ID != "default":
awsCfg, err = config.LoadDefaultConfig(
ctx,
Expand Down