connection naming cleanups
This commit is contained in:
parent
9187cab6ac
commit
470379e7ed
|
@ -10,12 +10,11 @@ import (
|
||||||
"github.com/hashicorp/aws-sdk-go/aws"
|
"github.com/hashicorp/aws-sdk-go/aws"
|
||||||
"github.com/hashicorp/aws-sdk-go/gen/autoscaling"
|
"github.com/hashicorp/aws-sdk-go/gen/autoscaling"
|
||||||
"github.com/hashicorp/aws-sdk-go/gen/ec2"
|
"github.com/hashicorp/aws-sdk-go/gen/ec2"
|
||||||
"github.com/hashicorp/aws-sdk-go/gen/iam"
|
|
||||||
"github.com/hashicorp/aws-sdk-go/gen/route53"
|
"github.com/hashicorp/aws-sdk-go/gen/route53"
|
||||||
"github.com/hashicorp/aws-sdk-go/gen/s3"
|
"github.com/hashicorp/aws-sdk-go/gen/s3"
|
||||||
|
|
||||||
awsSDK "github.com/awslabs/aws-sdk-go/aws"
|
awsSDK "github.com/awslabs/aws-sdk-go/aws"
|
||||||
awsIAM "github.com/awslabs/aws-sdk-go/service/IAM"
|
"github.com/awslabs/aws-sdk-go/service/IAM"
|
||||||
awsEC2 "github.com/awslabs/aws-sdk-go/service/ec2"
|
awsEC2 "github.com/awslabs/aws-sdk-go/service/ec2"
|
||||||
"github.com/awslabs/aws-sdk-go/service/rds"
|
"github.com/awslabs/aws-sdk-go/service/rds"
|
||||||
)
|
)
|
||||||
|
@ -37,7 +36,6 @@ type AWSClient struct {
|
||||||
rdsconn *rds.RDS
|
rdsconn *rds.RDS
|
||||||
iamconn *iam.IAM
|
iamconn *iam.IAM
|
||||||
ec2SDKconn *awsEC2.EC2
|
ec2SDKconn *awsEC2.EC2
|
||||||
iamSDKconn *awsIAM.IAM
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Client configures and returns a fully initailized AWSClient
|
// Client configures and returns a fully initailized AWSClient
|
||||||
|
@ -92,7 +90,7 @@ func (c *Config) Client() (interface{}, error) {
|
||||||
client.rdsconn = rds.New(awsConfig)
|
client.rdsconn = rds.New(awsConfig)
|
||||||
|
|
||||||
log.Println("[INFO] Initializing IAM SDK Connection")
|
log.Println("[INFO] Initializing IAM SDK Connection")
|
||||||
client.iamSDKconn = awsIAM.New(awsConfig)
|
client.iamconn = iam.New(awsConfig)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
|
|
|
@ -574,7 +574,7 @@ func resourceAwsDbInstanceStateRefreshFunc(
|
||||||
}
|
}
|
||||||
|
|
||||||
func buildRDSARN(d *schema.ResourceData, meta interface{}) (string, error) {
|
func buildRDSARN(d *schema.ResourceData, meta interface{}) (string, error) {
|
||||||
iamconn := meta.(*AWSClient).iamSDKconn
|
iamconn := meta.(*AWSClient).iamconn
|
||||||
region := meta.(*AWSClient).region
|
region := meta.(*AWSClient).region
|
||||||
// An zero value GetUserInput{} defers to the currently logged in user
|
// An zero value GetUserInput{} defers to the currently logged in user
|
||||||
resp, err := iamconn.GetUser(&iam.GetUserInput{})
|
resp, err := iamconn.GetUser(&iam.GetUserInput{})
|
||||||
|
|
Loading…
Reference in New Issue