remove duplicate readInstance call

This commit is contained in:
clint shryock 2015-11-16 15:16:41 -06:00
parent 66ad974193
commit 70f1c9c1e6
1 changed files with 2 additions and 2 deletions

View File

@ -180,6 +180,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}
// Instance ID is not set if the request is still pending
if request.InstanceId != nil {
d.Set("spot_instance_id", *request.InstanceId)
// Read the instance data, setting up connection information
if err := readInstance(d, meta); err != nil {
return fmt.Errorf("[ERR] Error reading Spot Instance Data: %s", err)
}
@ -187,8 +188,7 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}
d.Set("spot_request_state", *request.State)
d.Set("tags", tagsToMap(request.Tags))
// Read the instance data, setting up connection information
return readInstance(d, meta)
return nil
}
func readInstance(d *schema.ResourceData, meta interface{}) error {