providers/aws: flow log import
This commit is contained in:
parent
f6b77a6c02
commit
2a30178413
|
@ -0,0 +1,28 @@
|
|||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSFlowLog_importBasic(t *testing.T) {
|
||||
resourceName := "aws_flow_log.test_flow_log"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckFlowLogDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccFlowLogConfig_basic,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
|
@ -15,6 +15,9 @@ func resourceAwsFlowLog() *schema.Resource {
|
|||
Create: resourceAwsLogFlowCreate,
|
||||
Read: resourceAwsLogFlowRead,
|
||||
Delete: resourceAwsLogFlowDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"iam_role_arn": &schema.Schema{
|
||||
|
|
Loading…
Reference in New Issue