diff --git a/builtin/providers/aws/import_aws_db_subnet_group_group_test.go b/builtin/providers/aws/import_aws_db_subnet_group_group_test.go new file mode 100644 index 000000000..bef80960a --- /dev/null +++ b/builtin/providers/aws/import_aws_db_subnet_group_group_test.go @@ -0,0 +1,30 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSDBSubnetGroup_importBasic(t *testing.T) { + resourceName := "aws_db_subnet_group.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckDBSubnetGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccDBSubnetGroupConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "description"}, + }, + }, + }) +} diff --git a/builtin/providers/aws/resource_aws_db_subnet_group.go b/builtin/providers/aws/resource_aws_db_subnet_group.go index 718cdc711..5d1ae1191 100644 --- a/builtin/providers/aws/resource_aws_db_subnet_group.go +++ b/builtin/providers/aws/resource_aws_db_subnet_group.go @@ -21,6 +21,9 @@ func resourceAwsDbSubnetGroup() *schema.Resource { Read: resourceAwsDbSubnetGroupRead, Update: resourceAwsDbSubnetGroupUpdate, Delete: resourceAwsDbSubnetGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "arn": &schema.Schema{