github.com/mohanarpit/terraform@v0.6.16-0.20160909104007-291f29853544/builtin/providers/aws/import_aws_cloudfront_distribution_test.go (about) 1 package aws 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/resource" 7 ) 8 9 func TestAccAWSCloudFrontDistribution_importBasic(t *testing.T) { 10 resourceName := "aws_cloudfront_distribution.s3_distribution" 11 12 resource.Test(t, resource.TestCase{ 13 PreCheck: func() { testAccPreCheck(t) }, 14 Providers: testAccProviders, 15 CheckDestroy: testAccCheckCloudFrontDistributionDestroy, 16 Steps: []resource.TestStep{ 17 resource.TestStep{ 18 Config: testAccAWSCloudFrontDistributionS3Config, 19 }, 20 resource.TestStep{ 21 ResourceName: resourceName, 22 ImportState: true, 23 ImportStateVerify: true, 24 // Ignore retain_on_delete since it doesn't come from the AWS 25 // API. 26 ImportStateVerifyIgnore: []string{"retain_on_delete"}, 27 }, 28 }, 29 }) 30 }