Merge pull request #7282 from hashicorp/import-aws-vpngateway
provider/aws: Support Import for `aws_vpn_gateway`
This commit is contained in:
commit
c9a4f84caa
|
@ -0,0 +1,28 @@
|
||||||
|
package aws
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/hashicorp/terraform/helper/resource"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestAccAWSVpnGateway_importBasic(t *testing.T) {
|
||||||
|
resourceName := "aws_vpn_gateway.foo"
|
||||||
|
|
||||||
|
resource.Test(t, resource.TestCase{
|
||||||
|
PreCheck: func() { testAccPreCheck(t) },
|
||||||
|
Providers: testAccProviders,
|
||||||
|
CheckDestroy: testAccCheckVpnGatewayDestroy,
|
||||||
|
Steps: []resource.TestStep{
|
||||||
|
resource.TestStep{
|
||||||
|
Config: testAccVpnGatewayConfig,
|
||||||
|
},
|
||||||
|
|
||||||
|
resource.TestStep{
|
||||||
|
ResourceName: resourceName,
|
||||||
|
ImportState: true,
|
||||||
|
ImportStateVerify: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
|
@ -18,6 +18,9 @@ func resourceAwsVpnGateway() *schema.Resource {
|
||||||
Read: resourceAwsVpnGatewayRead,
|
Read: resourceAwsVpnGatewayRead,
|
||||||
Update: resourceAwsVpnGatewayUpdate,
|
Update: resourceAwsVpnGatewayUpdate,
|
||||||
Delete: resourceAwsVpnGatewayDelete,
|
Delete: resourceAwsVpnGatewayDelete,
|
||||||
|
Importer: &schema.ResourceImporter{
|
||||||
|
State: schema.ImportStatePassthrough,
|
||||||
|
},
|
||||||
|
|
||||||
Schema: map[string]*schema.Schema{
|
Schema: map[string]*schema.Schema{
|
||||||
"availability_zone": &schema.Schema{
|
"availability_zone": &schema.Schema{
|
||||||
|
|
Loading…
Reference in New Issue