github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/aws/import_aws_elasticache_subnet_group_test.go (about) 1 package aws 2 3 import ( 4 "testing" 5 6 "fmt" 7 8 "github.com/hashicorp/terraform/helper/acctest" 9 "github.com/hashicorp/terraform/helper/resource" 10 ) 11 12 func TestAccAWSElasticacheSubnetGroup_importBasic(t *testing.T) { 13 resourceName := "aws_elasticache_subnet_group.bar" 14 config := fmt.Sprintf(testAccAWSElasticacheSubnetGroupConfig, acctest.RandInt()) 15 16 resource.Test(t, resource.TestCase{ 17 PreCheck: func() { testAccPreCheck(t) }, 18 Providers: testAccProviders, 19 CheckDestroy: testAccCheckAWSElasticacheSubnetGroupDestroy, 20 Steps: []resource.TestStep{ 21 resource.TestStep{ 22 Config: config, 23 }, 24 25 resource.TestStep{ 26 ResourceName: resourceName, 27 ImportState: true, 28 ImportStateVerify: true, 29 ImportStateVerifyIgnore: []string{ 30 "description"}, 31 }, 32 }, 33 }) 34 }