Merge pull request #4132 from hashicorp/b-aws-spot-panic
provider/aws: Check for nil on some spot instance attributes
This commit is contained in:
commit
4e5c5c3ba2
|
@ -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