github.com/recobe182/terraform@v0.8.5-0.20170117231232-49ab22a935b7/builtin/providers/aws/import_aws_opsworks_stack_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 TestAccAWSOpsworksStackImportBasic(t *testing.T) { 11 name := acctest.RandString(10) 12 13 resourceName := "aws_opsworks_stack.tf-acc" 14 15 resource.Test(t, resource.TestCase{ 16 PreCheck: func() { testAccPreCheck(t) }, 17 Providers: testAccProviders, 18 CheckDestroy: testAccCheckAwsOpsworksStackDestroy, 19 Steps: []resource.TestStep{ 20 resource.TestStep{ 21 Config: testAccAwsOpsworksStackConfigVpcCreate(name), 22 }, 23 24 resource.TestStep{ 25 ResourceName: resourceName, 26 ImportState: true, 27 ImportStateVerify: true, 28 }, 29 }, 30 }) 31 }