From c81345f535c652eafbc666df6ffeb715556621fd Mon Sep 17 00:00:00 2001 From: Clint Shryock Date: Tue, 30 Jun 2015 09:28:14 -0500 Subject: [PATCH] provider/aws: Code cleanups for Spot Requests --- builtin/providers/aws/resource_aws_spot_instance_request.go | 3 ++- builtin/providers/aws/tags.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/builtin/providers/aws/resource_aws_spot_instance_request.go b/builtin/providers/aws/resource_aws_spot_instance_request.go index c44bdc79d..d37ef8a34 100644 --- a/builtin/providers/aws/resource_aws_spot_instance_request.go +++ b/builtin/providers/aws/resource_aws_spot_instance_request.go @@ -95,6 +95,7 @@ func resourceAwsSpotInstanceRequestCreate(d *schema.ResourceData, meta interface } // Make the spot instance request + log.Printf("[DEBUG] Requesting spot bid opts: %s", awsutil.StringValue(spotOpts)) resp, err := conn.RequestSpotInstances(spotOpts) if err != nil { return fmt.Errorf("Error requesting spot instances: %s", err) @@ -184,7 +185,7 @@ func resourceAwsSpotInstanceRequestUpdate(d *schema.ResourceData, meta interface d.Partial(false) - return resourceAwsInstanceRead(d, meta) + return resourceAwsSpotInstanceRequestRead(d, meta) } func resourceAwsSpotInstanceRequestDelete(d *schema.ResourceData, meta interface{}) error { diff --git a/builtin/providers/aws/tags.go b/builtin/providers/aws/tags.go index 4fc1b8d1d..3d7aff9b8 100644 --- a/builtin/providers/aws/tags.go +++ b/builtin/providers/aws/tags.go @@ -4,6 +4,7 @@ import ( "log" "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" "github.com/aws/aws-sdk-go/service/ec2" "github.com/hashicorp/terraform/helper/schema" ) @@ -38,7 +39,7 @@ func setTags(conn *ec2.EC2, d *schema.ResourceData) error { } } if len(create) > 0 { - log.Printf("[DEBUG] Creating tags: %#v for %s", create, d.Id()) + log.Printf("[DEBUG] Creating tags: %s for %s", awsutil.StringValue(create), d.Id()) _, err := conn.CreateTags(&ec2.CreateTagsInput{ Resources: []*string{aws.String(d.Id())}, Tags: create,