provider/aws: Fix aws_route panic when destination CIDR block is nil
Fixes #5754
This commit is contained in:
parent
bfda541989
commit
e5e6b571a5
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue