github.com/mohanarpit/terraform@v0.6.16-0.20160909104007-291f29853544/builtin/providers/aws/import_aws_cloudwatch_event_rule_test.go (about) 1 package aws 2 3 import ( 4 "testing" 5 6 "github.com/hashicorp/terraform/helper/resource" 7 ) 8 9 func TestAccAWSCloudWatchEventRule_importBasic(t *testing.T) { 10 resourceName := "aws_cloudwatch_event_rule.foo" 11 12 resource.Test(t, resource.TestCase{ 13 PreCheck: func() { testAccPreCheck(t) }, 14 Providers: testAccProviders, 15 CheckDestroy: testAccCheckAWSCloudWatchEventRuleDestroy, 16 Steps: []resource.TestStep{ 17 resource.TestStep{ 18 Config: testAccAWSCloudWatchEventRuleConfig, 19 }, 20 21 resource.TestStep{ 22 ResourceName: resourceName, 23 ImportState: true, 24 ImportStateVerify: true, 25 ImportStateVerifyIgnore: []string{"is_enabled"}, //this has a default value 26 }, 27 }, 28 }) 29 }