2016-07-12 09:49:33 +02:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
2016-09-06 11:49:02 +02:00
|
|
|
func TestAccAWSKmsKey_importBasic(t *testing.T) {
|
2016-07-12 09:49:33 +02:00
|
|
|
resourceName := "aws_kms_key.foo"
|
|
|
|
|
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckAWSKmsKeyDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
|
|
|
Config: testAccAWSKmsKey,
|
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
ImportStateVerifyIgnore: []string{"deletion_window_in_days"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|