provider/aws: Support Import `aws_elasticache_parameter_group` resource (#7336)

* provider/aws: Support Import `aws_elasticache_parameter_group` resource

```
make testacc TEST=./builtin/providers/aws
TESTARGS='-run=TestAccAWSElasticacheParameterGroup_'
==> Checking that code complies with gofmt requirements...
2016/06/26 19:46:35 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheParameterGroup_ -timeout 120m
=== RUN   TestAccAWSElasticacheParameterGroup_importBasic
--- PASS: TestAccAWSElasticacheParameterGroup_importBasic (22.42s)
=== RUN   TestAccAWSElasticacheParameterGroup_basic
--- PASS: TestAccAWSElasticacheParameterGroup_basic (39.08s)
PASS
ok      github.com/hashicorp/terraform/builtin/providers/aws    61.520s
```

* Update import_aws_elasticache_parameter_group_test.go
This commit is contained in:
Paul Stack 2016-06-28 16:02:43 +01:00 committed by Clint
parent d203c29e67
commit 0c16031556
2 changed files with 31 additions and 0 deletions

View File

@ -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,
},
},
})
}

View File

@ -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,