provider/aws: Support Import `aws_rds_cluster_parameter_group` (#7360)
* provider/aws: Support Import `aws_rds_cluster_parameter_group` ``` make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSDBClusterParameterGroup_' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /vendor/) TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSDBClusterParameterGroup_ -timeout 120m === RUN TestAccAWSDBClusterParameterGroup_importBasic --- PASS: TestAccAWSDBClusterParameterGroup_importBasic (29.60s) === RUN TestAccAWSDBClusterParameterGroup_basic --- PASS: TestAccAWSDBClusterParameterGroup_basic (47.27s) === RUN TestAccAWSDBClusterParameterGroup_disappears --- PASS: TestAccAWSDBClusterParameterGroup_disappears (21.58s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 98.483s ``` * Update import_aws_rds_cluster_parameter_group_test.go
This commit is contained in:
parent
561b4f1417
commit
aa00d38a10
|
@ -0,0 +1,28 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSDBClusterParameterGroup_importBasic(t *testing.T) {
|
||||
resourceName := "aws_rds_cluster_parameter_group.bar"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSDBClusterParameterGroupDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSDBClusterParameterGroupConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
|
@ -21,6 +21,10 @@ func resourceAwsRDSClusterParameterGroup() *schema.Resource {
|
|||
Read: resourceAwsRDSClusterParameterGroupRead,
|
||||
Update: resourceAwsRDSClusterParameterGroupUpdate,
|
||||
Delete: resourceAwsRDSClusterParameterGroupDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"arn": &schema.Schema{
|
||||
Type: schema.TypeString,
|
||||
|
|
Loading…
Reference in New Issue