diff --git a/builtin/providers/aws/resource_aws_route_table.go b/builtin/providers/aws/resource_aws_route_table.go index 26248bac1204..25a599672d11 100644 --- a/builtin/providers/aws/resource_aws_route_table.go +++ b/builtin/providers/aws/resource_aws_route_table.go @@ -361,7 +361,10 @@ func resourceAwsRouteTableDelete(d *schema.ResourceData, meta interface{}) error func resourceAwsRouteTableHash(v interface{}) int { var buf bytes.Buffer m := v.(map[string]interface{}) - buf.WriteString(fmt.Sprintf("%s-", m["cidr_block"].(string))) + + if v, ok := m["cidr_block"]; ok { + buf.WriteString(fmt.Sprintf("%s-", m["cidr_block"].(string))) + } if v, ok := m["gateway_id"]; ok { buf.WriteString(fmt.Sprintf("%s-", v.(string)))