mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-14 17:44:26 -06:00
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,
|
Read: resourceAwsDbSubnetGroupRead,
|
||||||
Update: resourceAwsDbSubnetGroupUpdate,
|
Update: resourceAwsDbSubnetGroupUpdate,
|
||||||
Delete: resourceAwsDbSubnetGroupDelete,
|
Delete: resourceAwsDbSubnetGroupDelete,
|
||||||
|
Importer: &schema.ResourceImporter{
|
||||||
|
State: schema.ImportStatePassthrough,
|
||||||
|
},
|
||||||
|
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"arn": &schema.Schema{
|
"arn": &schema.Schema{
|
||||||
|
Loading…
Reference in New Issue
Block a user