Merge pull request #2640 from hashicorp/b-aws-spot-instance-fix
provider/aws: Fix issue where spot instance requests would crash
This commit is contained in:
commit
d34bd0d227
|
@ -166,7 +166,10 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
d.Set("spot_bid_status", *request.Status.Code)
|
d.Set("spot_bid_status", *request.Status.Code)
|
||||||
|
// Instance ID is not set if the request is still pending
|
||||||
|
if request.InstanceID != nil {
|
||||||
d.Set("spot_instance_id", *request.InstanceID)
|
d.Set("spot_instance_id", *request.InstanceID)
|
||||||
|
}
|
||||||
d.Set("spot_request_state", *request.State)
|
d.Set("spot_request_state", *request.State)
|
||||||
d.Set("tags", tagsToMap(request.Tags))
|
d.Set("tags", tagsToMap(request.Tags))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue