provider/aws: Check for nil on some spot instance attributes
This commit is contained in:
parent
3cbe014e31
commit
c5f0c8ced6
|
@ -194,8 +194,13 @@ func resourceAwsSpotInstanceRequestRead(d *schema.ResourceData, meta interface{}
|
|||
return fmt.Errorf("[ERR] Error reading Spot Instance Data: %s", err)
|
||||
}
|
||||
}
|
||||
d.Set("spot_request_state", *request.State)
|
||||
d.Set("block_duration_minutes", *request.BlockDurationMinutes)
|
||||
|
||||
if request.State != nil {
|
||||
d.Set("spot_request_state", *request.State)
|
||||
}
|
||||
if request.BlockDurationMinutes != nil {
|
||||
d.Set("block_duration_minutes", *request.BlockDurationMinutes)
|
||||
}
|
||||
d.Set("tags", tagsToMap(request.Tags))
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue