mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-09 23:54:17 -06:00
93832527b1
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
34 lines
707 B
Go
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",
|
|
},
|
|
},
|
|
},
|
|
})
|
|
}
|