opentofu/builtin/providers/aws/import_aws_db_instance_test.go
Paul Hinze 93832527b1
provider/aws: Fixup skip_final_snapshot import
Neither skip_final_snapshot nor final_snapshot_identifier can be fetched
from any API call, so we need to default skip_final_snapshot to true
during import so that final_snapshot_identifier is not required
2016-07-15 11:30:33 -06:00

34 lines
707 B
Go

package aws
import (
"testing"
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSDBInstance_importBasic(t *testing.T) {
resourceName := "aws_db_instance.bar"
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSDBInstanceDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccAWSDBInstanceConfig,
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{
"password",
"skip_final_snapshot",
"final_snapshot_identifier",
},
},
},
})
}