provider/aws: Fix aws_route panic when destination CIDR block is nil

Fixes #5754
This commit is contained in:
Paul Hinze 2016-03-22 10:34:09 -05:00
parent bfda541989
commit e5e6b571a5
1 changed files with 1 additions and 1 deletions

View File

@ -294,7 +294,7 @@ func resourceAwsRouteExists(d *schema.ResourceData, meta interface{}) (bool, err
cidr := d.Get("destination_cidr_block").(string)
for _, route := range (*res.RouteTables[0]).Routes {
if *route.DestinationCidrBlock == cidr {
if route.DestinationCidrBlock != nil && *route.DestinationCidrBlock == cidr {
return true, nil
}
}