diff --git a/builtin/providers/aws/import_aws_elasticache_parameter_group_test.go b/builtin/providers/aws/import_aws_elasticache_parameter_group_test.go new file mode 100644 index 000000000..8754b8181 --- /dev/null +++ b/builtin/providers/aws/import_aws_elasticache_parameter_group_test.go @@ -0,0 +1,28 @@ +package aws + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccAWSElasticacheParameterGroup_importBasic(t *testing.T) { + resourceName := "aws_elasticache_parameter_group.bar" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckAWSElasticacheParameterGroupDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccAWSElasticacheParameterGroupConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/aws/resource_aws_elasticache_parameter_group.go b/builtin/providers/aws/resource_aws_elasticache_parameter_group.go index 54533b50b..e73d0be6f 100644 --- a/builtin/providers/aws/resource_aws_elasticache_parameter_group.go +++ b/builtin/providers/aws/resource_aws_elasticache_parameter_group.go @@ -21,6 +21,9 @@ func resourceAwsElasticacheParameterGroup() *schema.Resource { Read: resourceAwsElasticacheParameterGroupRead, Update: resourceAwsElasticacheParameterGroupUpdate, Delete: resourceAwsElasticacheParameterGroupDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, Schema: map[string]*schema.Schema{ "name": &schema.Schema{ Type: schema.TypeString,