2017-02-15 15:59:28 +01:00
|
|
|
package aws
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2017-02-18 19:53:32 +01:00
|
|
|
"github.com/hashicorp/terraform/helper/acctest"
|
2017-02-15 15:59:28 +01:00
|
|
|
"github.com/hashicorp/terraform/helper/resource"
|
|
|
|
)
|
|
|
|
|
|
|
|
func TestAccAWSCloudwatchLogDestination_importBasic(t *testing.T) {
|
|
|
|
resourceName := "aws_cloudwatch_log_destination.test"
|
|
|
|
|
2017-02-18 19:53:32 +01:00
|
|
|
rstring := acctest.RandString(5)
|
|
|
|
|
2017-02-15 15:59:28 +01:00
|
|
|
resource.Test(t, resource.TestCase{
|
|
|
|
PreCheck: func() { testAccPreCheck(t) },
|
|
|
|
Providers: testAccProviders,
|
|
|
|
CheckDestroy: testAccCheckAWSCloudwatchLogDestinationDestroy,
|
|
|
|
Steps: []resource.TestStep{
|
|
|
|
resource.TestStep{
|
2017-02-18 19:53:32 +01:00
|
|
|
Config: testAccAWSCloudwatchLogDestinationConfig(rstring),
|
2017-02-15 15:59:28 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
resource.TestStep{
|
|
|
|
ResourceName: resourceName,
|
|
|
|
ImportState: true,
|
|
|
|
ImportStateVerify: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|