github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/builtin/providers/aws/import_aws_db_option_group_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 TestAccAWSDBOptionGroup_importBasic(t *testing.T) { 12 resourceName := "aws_db_option_group.bar" 13 rName := fmt.Sprintf("option-group-test-terraform-%s", acctest.RandString(5)) 14 15 resource.Test(t, resource.TestCase{ 16 PreCheck: func() { testAccPreCheck(t) }, 17 Providers: testAccProviders, 18 CheckDestroy: testAccCheckAWSDBOptionGroupDestroy, 19 Steps: []resource.TestStep{ 20 resource.TestStep{ 21 Config: testAccAWSDBOptionGroupBasicConfig(rName), 22 }, 23 24 resource.TestStep{ 25 ResourceName: resourceName, 26 ImportState: true, 27 ImportStateVerify: true, 28 }, 29 }, 30 }) 31 }