diff --git a/builtin/providers/aws/import_aws_redshift_subnet_group_test.go b/builtin/providers/aws/import_aws_redshift_subnet_group_test.go new file mode 100644 index 000000000..a5ff9256e --- /dev/null +++ b/builtin/providers/aws/import_aws_redshift_subnet_group_test.go @@ -0,0 +1,30 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSRedshiftSubnetGroup_importBasic(t *testing.T) { + resourceName := "aws_redshift_subnet_group.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRedshiftSubnetGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRedshiftSubnetGroupConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "description"}, + }, + }, + }) +} diff --git a/builtin/providers/aws/resource_aws_redshift_subnet_group.go b/builtin/providers/aws/resource_aws_redshift_subnet_group.go index d270c7b31..5b119ed7f 100644 --- a/builtin/providers/aws/resource_aws_redshift_subnet_group.go +++ b/builtin/providers/aws/resource_aws_redshift_subnet_group.go @@ -19,6 +19,9 @@ func resourceAwsRedshiftSubnetGroup() *schema.Resource { Read: resourceAwsRedshiftSubnetGroupRead, Update: resourceAwsRedshiftSubnetGroupUpdate, Delete: resourceAwsRedshiftSubnetGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{