github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/aws/import_aws_db_instance_test.go (about)

     1  package aws
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/resource"
     7  )
     8  
     9  func TestAccAWSDBInstance_importBasic(t *testing.T) {
    10  	resourceName := "aws_db_instance.bar"
    11  
    12  	resource.Test(t, resource.TestCase{
    13  		PreCheck:     func() { testAccPreCheck(t) },
    14  		Providers:    testAccProviders,
    15  		CheckDestroy: testAccCheckAWSDBInstanceDestroy,
    16  		Steps: []resource.TestStep{
    17  			{
    18  				Config: testAccAWSDBInstanceConfig,
    19  			},
    20  
    21  			{
    22  				ResourceName:      resourceName,
    23  				ImportState:       true,
    24  				ImportStateVerify: true,
    25  				ImportStateVerifyIgnore: []string{
    26  					"password",
    27  					"skip_final_snapshot",
    28  					"final_snapshot_identifier",
    29  				},
    30  			},
    31  		},
    32  	})
    33  }