Merge pull request #7592 from TimeIncOSS/f-aws-efs-fs-import

provider/aws: Allow import of efs_file_system
pull/7594/head
Radek Simko 10 years ago committed by GitHub
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,
Delete: resourceAwsEfsFileSystemDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Schema: map[string]*schema.Schema{
"reference_name": &schema.Schema{
Type: schema.TypeString,

Loading…
Cancel
Save