provider/aws: pull iamconn setup earlier (#7734)
Fixes problem introduced in re-arrangement of config
This commit is contained in:
parent
7ba439dbf6
commit
df5d2c9a63
|
@ -193,7 +193,10 @@ func (c *Config) Client() (interface{}, error) {
|
||||||
dynamoSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DynamoDBEndpoint)})
|
dynamoSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.DynamoDBEndpoint)})
|
||||||
kinesisSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisEndpoint)})
|
kinesisSess := sess.Copy(&aws.Config{Endpoint: aws.String(c.KinesisEndpoint)})
|
||||||
|
|
||||||
|
// These two services need to be set up early so we can check on AccountID
|
||||||
|
client.iamconn = iam.New(awsIamSess)
|
||||||
client.stsconn = sts.New(sess)
|
client.stsconn = sts.New(sess)
|
||||||
|
|
||||||
err = c.ValidateCredentials(client.stsconn)
|
err = c.ValidateCredentials(client.stsconn)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errs = append(errs, err)
|
errs = append(errs, err)
|
||||||
|
@ -233,7 +236,6 @@ func (c *Config) Client() (interface{}, error) {
|
||||||
client.esconn = elasticsearch.New(sess)
|
client.esconn = elasticsearch.New(sess)
|
||||||
client.firehoseconn = firehose.New(sess)
|
client.firehoseconn = firehose.New(sess)
|
||||||
client.glacierconn = glacier.New(sess)
|
client.glacierconn = glacier.New(sess)
|
||||||
client.iamconn = iam.New(awsIamSess)
|
|
||||||
client.kinesisconn = kinesis.New(kinesisSess)
|
client.kinesisconn = kinesis.New(kinesisSess)
|
||||||
client.kmsconn = kms.New(sess)
|
client.kmsconn = kms.New(sess)
|
||||||
client.lambdaconn = lambda.New(sess)
|
client.lambdaconn = lambda.New(sess)
|
||||||
|
|
Loading…
Reference in New Issue