Merge pull request #7592 from TimeIncOSS/f-aws-efs-fs-import
provider/aws: Allow import of efs_file_system
This commit is contained in:
commit
ef4851d524
|
@ -0,0 +1,29 @@
|
||||||
|
package aws
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAccAWSEFSFileSystem_importBasic(t *testing.T) {
|
||||||
|
resourceName := "aws_efs_file_system.foo-with-tags"
|
||||||
|
|
||||||
|
resource.Test(t, resource.TestCase{
|
||||||
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
|
Providers: testAccProviders,
|
||||||
|
CheckDestroy: testAccCheckEfsFileSystemDestroy,
|
||||||
|
Steps: []resource.TestStep{
|
||||||
|
resource.TestStep{
|
||||||
|
Config: testAccAWSEFSFileSystemConfigWithTags,
|
||||||
|
},
|
||||||
|
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: resourceName,
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
ImportStateVerifyIgnore: []string{"reference_name"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
|
@ -19,6 +19,10 @@ func resourceAwsEfsFileSystem() *schema.Resource {
|
||||||
Update: resourceAwsEfsFileSystemUpdate,
|
Update: resourceAwsEfsFileSystemUpdate,
|
||||||
Delete: resourceAwsEfsFileSystemDelete,
|
Delete: resourceAwsEfsFileSystemDelete,
|
||||||
|
|
||||||
|
Importer: &schema.ResourceImporter{
|
||||||
|
State: schema.ImportStatePassthrough,
|
||||||
|
},
|
||||||
|
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"reference_name": &schema.Schema{
|
"reference_name": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
|
Loading…
Reference in New Issue