mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
provider/aws: Allow import of efs_file_system
This commit is contained in:
parent
edd67547bc
commit
f5ef8f36c2
29
builtin/providers/aws/import_aws_efs_file_system_test.go
Normal file
29
builtin/providers/aws/import_aws_efs_file_system_test.go
Normal file
@ -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…
Reference in New Issue
Block a user