provider/aws: Allow import of efs_mount_target
This commit is contained in:
parent
ef4851d524
commit
86c1661205
|
@ -0,0 +1,28 @@
|
||||||
|
package aws
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAccAWSEFSMountTarget_importBasic(t *testing.T) {
|
||||||
|
resourceName := "aws_efs_mount_target.alpha"
|
||||||
|
|
||||||
|
resource.Test(t, resource.TestCase{
|
||||||
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
|
Providers: testAccProviders,
|
||||||
|
CheckDestroy: testAccCheckEfsMountTargetDestroy,
|
||||||
|
Steps: []resource.TestStep{
|
||||||
|
resource.TestStep{
|
||||||
|
Config: testAccAWSEFSMountTargetConfig,
|
||||||
|
},
|
||||||
|
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: resourceName,
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
|
@ -20,6 +20,10 @@ func resourceAwsEfsMountTarget() *schema.Resource {
|
||||||
Update: resourceAwsEfsMountTargetUpdate,
|
Update: resourceAwsEfsMountTargetUpdate,
|
||||||
Delete: resourceAwsEfsMountTargetDelete,
|
Delete: resourceAwsEfsMountTargetDelete,
|
||||||
|
|
||||||
|
Importer: &schema.ResourceImporter{
|
||||||
|
State: schema.ImportStatePassthrough,
|
||||||
|
},
|
||||||
|
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"file_system_id": &schema.Schema{
|
"file_system_id": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
|
Loading…
Reference in New Issue