mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-24 23:46:26 -06:00
providers/aws: customer gateway import
This commit is contained in:
parent
2a30178413
commit
4e3488afb8
28
builtin/providers/aws/import_aws_customer_gateway_test.go
Normal file
28
builtin/providers/aws/import_aws_customer_gateway_test.go
Normal file
@ -0,0 +1,28 @@
|
||||
package aws
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/terraform/helper/resource"
|
||||
)
|
||||
|
||||
func TestAccAWSCustomerGateway_importBasic(t *testing.T) {
|
||||
resourceName := "aws_customer_gateway.foo"
|
||||
|
||||
resource.Test(t, resource.TestCase{
|
||||
PreCheck: func() { testAccPreCheck(t) },
|
||||
Providers: testAccProviders,
|
||||
CheckDestroy: testAccCheckCustomerGatewayDestroy,
|
||||
Steps: []resource.TestStep{
|
||||
resource.TestStep{
|
||||
Config: testAccCustomerGatewayConfig,
|
||||
},
|
||||
|
||||
resource.TestStep{
|
||||
ResourceName: resourceName,
|
||||
ImportState: true,
|
||||
ImportStateVerify: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
@ -20,6 +20,9 @@ func resourceAwsCustomerGateway() *schema.Resource {
|
||||
Read: resourceAwsCustomerGatewayRead,
|
||||
Update: resourceAwsCustomerGatewayUpdate,
|
||||
Delete: resourceAwsCustomerGatewayDelete,
|
||||
Importer: &schema.ResourceImporter{
|
||||
State: schema.ImportStatePassthrough,
|
||||
},
|
||||
|
||||
Schema: map[string]*schema.Schema{
|
||||
"bgp_asn": &schema.Schema{
|
||||
|
Loading…
Reference in New Issue
Block a user