github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/aws/import_aws_cloudtrail_test.go (about)

     1  package aws
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/hashicorp/terraform/helper/acctest"
     7  	"github.com/hashicorp/terraform/helper/resource"
     8  )
     9  
    10  func TestAccAWSCloudTrail_importBasic(t *testing.T) {
    11  	resourceName := "aws_cloudtrail.foobar"
    12  	cloudTrailRandInt := acctest.RandInt()
    13  
    14  	resource.Test(t, resource.TestCase{
    15  		PreCheck:     func() { testAccPreCheck(t) },
    16  		Providers:    testAccProviders,
    17  		CheckDestroy: testAccCheckAWSCloudTrailDestroy,
    18  		Steps: []resource.TestStep{
    19  			resource.TestStep{
    20  				Config: testAccAWSCloudTrailConfig(cloudTrailRandInt),
    21  			},
    22  
    23  			resource.TestStep{
    24  				ResourceName:            resourceName,
    25  				ImportState:             true,
    26  				ImportStateVerify:       true,
    27  				ImportStateVerifyIgnore: []string{"enable_log_file_validation", "is_multi_region_trail", "include_global_service_events", "enable_logging"},
    28  			},
    29  		},
    30  	})
    31  }