github.com/vtorhonen/terraform@v0.9.0-beta2.0.20170307220345-5d894e4ffda7/builtin/providers/aws/import_aws_autoscaling_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 TestAccAWSAutoScalingGroup_importBasic(t *testing.T) { 12 resourceName := "aws_autoscaling_group.bar" 13 randName := fmt.Sprintf("terraform-test-%s", acctest.RandString(10)) 14 15 resource.Test(t, resource.TestCase{ 16 PreCheck: func() { testAccPreCheck(t) }, 17 Providers: testAccProviders, 18 CheckDestroy: testAccCheckAWSAutoScalingGroupDestroy, 19 Steps: []resource.TestStep{ 20 resource.TestStep{ 21 Config: testAccAWSAutoScalingGroupConfig(randName), 22 }, 23 24 resource.TestStep{ 25 ResourceName: resourceName, 26 ImportState: true, 27 ImportStateVerify: true, 28 ImportStateVerifyIgnore: []string{ 29 "force_delete", "metrics_granularity", "wait_for_capacity_timeout"}, 30 }, 31 }, 32 }) 33 }