diff --git a/aws/config.go b/aws/config.go index b2e0f887504..ac154888d3a 100644 --- a/aws/config.go +++ b/aws/config.go @@ -295,6 +295,7 @@ type AWSClient struct { stsconn *sts.STS supportedplatforms []string swfconn *swf.SWF + terraformVersion string transferconn *transfer.Transfer wafconn *waf.WAF wafregionalconn *wafregional.WAFRegional @@ -481,6 +482,7 @@ func (c *Config) Client() (interface{}, error) { storagegatewayconn: storagegateway.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["storagegateway"])})), stsconn: sts.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["sts"])})), swfconn: swf.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["swf"])})), + terraformVersion: c.terraformVersion, transferconn: transfer.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["transfer"])})), wafconn: waf.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["waf"])})), wafregionalconn: wafregional.New(sess.Copy(&aws.Config{Endpoint: aws.String(c.Endpoints["wafregional"])})), diff --git a/aws/resource_aws_opsworks_stack.go b/aws/resource_aws_opsworks_stack.go index b25c37160e6..dabe4cab23f 100644 --- a/aws/resource_aws_opsworks_stack.go +++ b/aws/resource_aws_opsworks_stack.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/terraform/helper/resource" "github.com/hashicorp/terraform/helper/schema" - "github.com/hashicorp/terraform/terraform" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/arn" @@ -387,7 +386,7 @@ func opsworksConnForRegion(region string, meta interface{}) (*opsworks.OpsWorks, return nil, fmt.Errorf("Error creating AWS session: %s", err) } - sess.Handlers.Build.PushBack(request.MakeAddToUserAgentHandler("APN/1.0 HashiCorp/1.0 Terraform", terraform.VersionString())) + sess.Handlers.Build.PushBack(request.MakeAddToUserAgentHandler("APN/1.0 HashiCorp/1.0 Terraform", meta.(*AWSClient).terraformVersion)) newSession := sess.Copy(&aws.Config{Region: aws.String(region)}) newOpsworksconn := opsworks.New(newSession)