github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/aws/import_aws_redshift_cluster_test.go (about)

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