Merge pull request #1576 from snyk/fix/do_not_panic_on_aws_init
fix: do not panic on aws provider initmain
commit
25c259dfd5
|
@ -63,9 +63,14 @@ func NewAWSTerraformProvider(version string, progress enumeration.ProgressCounte
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
p.session = session.Must(session.NewSessionWithOptions(session.Options{
|
|
||||||
|
p.session, err = session.NewSessionWithOptions(session.Options{
|
||||||
SharedConfigState: session.SharedConfigEnable,
|
SharedConfigState: session.SharedConfigEnable,
|
||||||
}))
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
tfProvider, err := terraform.NewTerraformProvider(installer, terraform.TerraformProviderConfig{
|
tfProvider, err := terraform.NewTerraformProvider(installer, terraform.TerraformProviderConfig{
|
||||||
Name: p.name,
|
Name: p.name,
|
||||||
DefaultAlias: *p.session.Config.Region,
|
DefaultAlias: *p.session.Config.Region,
|
||||||
|
|
Loading…
Reference in New Issue