From 470379e7edaa2900fe3c27924c880d2bb376374e Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Wed, 15 Apr 2015 14:36:08 -0500 Subject: [PATCH] connection naming cleanups --- builtin/providers/aws/config.go | 6 ++---- builtin/providers/aws/resource_aws_db_instance.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/builtin/providers/aws/config.go b/builtin/providers/aws/config.go index e5fb405ff..8701c0579 100644 --- a/builtin/providers/aws/config.go +++ b/builtin/providers/aws/config.go @@ -10,12 +10,11 @@ import ( "github.com/hashicorp/aws-sdk-go/aws" "github.com/hashicorp/aws-sdk-go/gen/autoscaling" "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/s3" 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" "github.com/awslabs/aws-sdk-go/service/rds" ) @@ -37,7 +36,6 @@ type AWSClient struct { rdsconn *rds.RDS iamconn *iam.IAM ec2SDKconn *awsEC2.EC2 - iamSDKconn *awsIAM.IAM } // Client configures and returns a fully initailized AWSClient @@ -92,7 +90,7 @@ func (c *Config) Client() (interface{}, error) { client.rdsconn = rds.New(awsConfig) log.Println("[INFO] Initializing IAM SDK Connection") - client.iamSDKconn = awsIAM.New(awsConfig) + client.iamconn = iam.New(awsConfig) } if len(errs) > 0 { diff --git a/builtin/providers/aws/resource_aws_db_instance.go b/builtin/providers/aws/resource_aws_db_instance.go index 9eec71d8b..3ac72c5e7 100644 --- a/builtin/providers/aws/resource_aws_db_instance.go +++ b/builtin/providers/aws/resource_aws_db_instance.go @@ -574,7 +574,7 @@ func resourceAwsDbInstanceStateRefreshFunc( } func buildRDSARN(d *schema.ResourceData, meta interface{}) (string, error) { - iamconn := meta.(*AWSClient).iamSDKconn + iamconn := meta.(*AWSClient).iamconn region := meta.(*AWSClient).region // An zero value GetUserInput{} defers to the currently logged in user resp, err := iamconn.GetUser(&iam.GetUserInput{})