mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-08 15:13:56 -06:00
providers/aws ENI import
This commit is contained in:
parent
9cdbed11ff
commit
a4e48b19c0
28
builtin/providers/aws/import_aws_network_interface_test.go
Normal file
28
builtin/providers/aws/import_aws_network_interface_test.go
Normal file
@ -0,0 +1,28 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSENI_importBasic(t *testing.T) {
|
||||
resourceName := "aws_network_interface.bar"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckAWSENIDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccAWSENIConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
@ -21,6 +21,9 @@ func resourceAwsNetworkInterface() *schema.Resource {
|
||||
Read: resourceAwsNetworkInterfaceRead,
|
||||
Update: resourceAwsNetworkInterfaceUpdate,
|
||||
Delete: resourceAwsNetworkInterfaceDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user