mirror of https://github.com/hashicorp/terraform
Merge pull request #7284 from hashicorp/import-aws-cwlg
provider/aws: Add Import support for `aws_cloudwatch_log_group`pull/7294/head
commit
1bbb75bc9a
@ -0,0 +1,29 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSCloudWatchLogGroup_importBasic(t *testing.T) {
|
||||
resourceName := "aws_cloudwatch_log_group.foobar"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSCloudWatchLogGroupDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSCloudWatchLogGroupConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
ImportStateVerifyIgnore: []string{"retention_in_days"}, //this has a default value
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
Loading…
Reference in new issue