Skip to content

Commit

Permalink
Merge pull request #562 from sallyom/use-env-vars-for-cloud-cred-secret
Browse files Browse the repository at this point in the history
allow missing creds file when getting data for aws-creds secret
  • Loading branch information
openshift-merge-robot committed Oct 30, 2018
2 parents 657fb43 + 2b52ad2 commit 867ab71
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/asset/manifests/tectonic.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"os"
"path/filepath"

"github.com/aws/aws-sdk-go/aws/session"
"github.com/ghodss/yaml"
"github.com/pkg/errors"

"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/openshift/installer/pkg/asset"
"github.com/openshift/installer/pkg/asset/installconfig"
"github.com/openshift/installer/pkg/asset/machines"
Expand Down Expand Up @@ -66,8 +66,10 @@ func (t *Tectonic) Generate(dependencies asset.Parents) error {
platform := installConfig.Config.Platform.Name()
switch platform {
case "aws":
p := credentials.SharedCredentialsProvider{}
creds, err := p.Retrieve()
ssn := session.Must(session.NewSessionWithOptions(session.Options{
SharedConfigState: session.SharedConfigEnable,
}))
creds, err := ssn.Config.Credentials.Get()
if err != nil {
return err
}
Expand Down

0 comments on commit 867ab71

Please sign in to comment.