terraform/builtin/providers/aws/import_aws_subnet_test.go

29 lines
559 B
Go

package aws
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSSubnet_importBasic(t *testing.T) {
resourceName := "aws_subnet.foo"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckSubnetDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccSubnetConfig,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}