Merge pull request #7286 from hashicorp/import-aws-dbsng
provider/aws: Support Import functionality for `aws_db_subnet_group`
This commit is contained in:
commit
a6ae8eaac8
|
@ -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"},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
|
@ -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{
|
||||
|
|
Loading…
Reference in New Issue