provider/aws: Code cleanups for Spot Requests

This commit is contained in:
Clint Shryock 2015-06-30 09:28:14 -05:00
parent 57980349fc
commit c81345f535
2 changed files with 4 additions and 2 deletions

View File

@ -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 {

View File

@ -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,