terraform/builtin/providers/aws/import_aws_flow_log_test.go

33 lines
698 B
Go
Raw Normal View History

2016-05-13 22:05:11 +02:00
package aws
import (
"fmt"
2016-05-13 22:05:11 +02:00
"testing"
"github.com/hashicorp/terraform/helper/acctest"
2016-05-13 22:05:11 +02:00
"github.com/hashicorp/terraform/helper/resource"
)
func TestAccAWSFlowLog_importBasic(t *testing.T) {
resourceName := "aws_flow_log.test_flow_log"
fln := fmt.Sprintf("tf-test-fl-%d", acctest.RandInt())
2016-05-13 22:05:11 +02:00
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testAccCheckFlowLogDestroy,
Steps: []resource.TestStep{
resource.TestStep{
Config: testAccFlowLogConfig_basic(fln),
2016-05-13 22:05:11 +02:00
},
resource.TestStep{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}