diff --git a/builtin/providers/aws/import_aws_vpc_dhcp_options_test.go b/builtin/providers/aws/import_aws_vpc_dhcp_options_test.go new file mode 100644 index 000000000..e0f605f28 --- /dev/null +++ b/builtin/providers/aws/import_aws_vpc_dhcp_options_test.go @@ -0,0 +1,27 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSDHCPOptions_importBasic(t *testing.T) { + resourceName := "aws_vpc_dhcp_options.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDHCPOptionsConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/aws/resource_aws_vpc_dhcp_options.go b/builtin/providers/aws/resource_aws_vpc_dhcp_options.go index 156654b49..16c33fd4d 100644 --- a/builtin/providers/aws/resource_aws_vpc_dhcp_options.go +++ b/builtin/providers/aws/resource_aws_vpc_dhcp_options.go @@ -19,6 +19,9 @@ func resourceAwsVpcDhcpOptions() *schema.Resource { Read: resourceAwsVpcDhcpOptionsRead, Update: resourceAwsVpcDhcpOptionsUpdate, Delete: resourceAwsVpcDhcpOptionsDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "domain_name": &schema.Schema{