package aws import ( "os" "testing" "github.com/hashicorp/terraform/helper/resource" ) func TestAccAWSDBSecurityGroup_importBasic(t *testing.T) { oldvar := os.Getenv("AWS_DEFAULT_REGION") os.Setenv("AWS_DEFAULT_REGION", "us-east-1") defer os.Setenv("AWS_DEFAULT_REGION", oldvar) resourceName := "aws_db_security_group.bar" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSDBSecurityGroupDestroy, Steps: []resource.TestStep{ resource.TestStep{ Config: testAccAWSDBSecurityGroupConfig, }, resource.TestStep{ ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) }