package aws import ( "os" "testing" "github.com/hashicorp/terraform/helper/acctest" "github.com/hashicorp/terraform/helper/resource" ) func TestAccAWSRedshiftSecurityGroup_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) rInt := acctest.RandInt() resourceName := "aws_redshift_security_group.bar" resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, Providers: testAccProviders, CheckDestroy: testAccCheckAWSRedshiftSecurityGroupDestroy, Steps: []resource.TestStep{ { Config: testAccAWSRedshiftSecurityGroupConfig_ingressCidr(rInt), }, { ResourceName: resourceName, ImportState: true, ImportStateVerify: true, }, }, }) }