github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/aws/import_aws_flow_log_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 TestAccAWSFlowLog_importBasic(t *testing.T) { 12 resourceName := "aws_flow_log.test_flow_log" 13 14 fln := fmt.Sprintf("tf-test-fl-%d", acctest.RandInt()) 15 16 resource.Test(t, resource.TestCase{ 17 PreCheck: func() { testAccPreCheck(t) }, 18 Providers: testAccProviders, 19 CheckDestroy: testAccCheckFlowLogDestroy, 20 Steps: []resource.TestStep{ 21 resource.TestStep{ 22 Config: testAccFlowLogConfig_basic(fln), 23 }, 24 25 resource.TestStep{ 26 ResourceName: resourceName, 27 ImportState: true, 28 ImportStateVerify: true, 29 }, 30 }, 31 }) 32 }