providers/aws: route table import should ignore default rule
This commit is contained in:
parent
08b7f67227
commit
a1035804d4
|
@ -33,6 +33,11 @@ func resourceAwsRouteTableImportState(
|
|||
// Construct the routes
|
||||
subResource := resourceAwsRoute()
|
||||
for _, route := range table.Routes {
|
||||
// Ignore the local/default route
|
||||
if route.GatewayId != nil && *route.GatewayId == "local" {
|
||||
continue
|
||||
}
|
||||
|
||||
// Minimal data for route
|
||||
d := subResource.Data(nil)
|
||||
d.SetType("aws_route")
|
||||
|
|
|
@ -11,7 +11,7 @@ import (
|
|||
func TestAccAWSRouteTable_importBasic(t *testing.T) {
|
||||
checkFn := func(s []*terraform.InstanceState) error {
|
||||
// Expect 2: group, 1 rules
|
||||
if len(s) != 3 {
|
||||
if len(s) != 2 {
|
||||
return fmt.Errorf("bad states: %#v", s)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue