github.com/jrperritt/terraform@v0.1.1-0.20170525065507-96f391dafc38/builtin/providers/aws/import_aws_kms_alias_test.go (about) 1 package aws 2 3 import ( 4 "testing" 5 "time" 6 7 "github.com/hashicorp/terraform/helper/acctest" 8 "github.com/hashicorp/terraform/helper/resource" 9 ) 10 11 func TestAccAWSKmsAlias_importBasic(t *testing.T) { 12 resourceName := "aws_kms_alias.single" 13 rInt := acctest.RandInt() 14 kmsAliasTimestamp := time.Now().Format(time.RFC1123) 15 16 resource.Test(t, resource.TestCase{ 17 PreCheck: func() { testAccPreCheck(t) }, 18 Providers: testAccProviders, 19 CheckDestroy: testAccCheckAWSKmsAliasDestroy, 20 Steps: []resource.TestStep{ 21 resource.TestStep{ 22 Config: testAccAWSKmsSingleAlias(rInt, kmsAliasTimestamp), 23 }, 24 25 resource.TestStep{ 26 ResourceName: resourceName, 27 ImportState: true, 28 ImportStateVerify: true, 29 }, 30 }, 31 }) 32 }