|
| 1 | +--- |
| 2 | +subcategory: "VPN" |
| 3 | +layout: "tencentcloud" |
| 4 | +page_title: "TencentCloud: tencentcloud_vpn_gateway_route" |
| 5 | +sidebar_current: "docs-tencentcloud-resource-vpn_gateway_route" |
| 6 | +description: |- |
| 7 | + Provides a resource to create a VPN gateway route. |
| 8 | +--- |
| 9 | + |
| 10 | +# tencentcloud_vpn_gateway_route |
| 11 | + |
| 12 | +Provides a resource to create a VPN gateway route. |
| 13 | + |
| 14 | +## Example Usage |
| 15 | + |
| 16 | +```hcl |
| 17 | +resource "tencentcloud_vpn_gateway_route" "route" { |
| 18 | + vpn_gateway_id = "vpngw-ak9sjem2" |
| 19 | + destination_cidr_block = "10.0.0.0/16" |
| 20 | + instance_id = "vpnx-5b5dmao3" |
| 21 | + instance_type = "VPNCONN" |
| 22 | + priority = 100 |
| 23 | + status = "DISABLE" |
| 24 | +} |
| 25 | +``` |
| 26 | + |
| 27 | +## Argument Reference |
| 28 | + |
| 29 | +The following arguments are supported: |
| 30 | + |
| 31 | +* `destination_cidr_block` - (Required, ForceNew) Destination IDC IP range. |
| 32 | +* `instance_id` - (Required, ForceNew) Instance ID of the next hop. |
| 33 | +* `instance_type` - (Required, ForceNew) Next hop type (type of the associated instance). Valid values: VPNCONN (VPN tunnel) and CCN (CCN instance). |
| 34 | +* `priority` - (Required, ForceNew) Priority. Valid values: 0 and 100. |
| 35 | +* `status` - (Required) Status. Valid values: ENABLE and DISABLE. |
| 36 | +* `vpn_gateway_id` - (Required, ForceNew) VPN gateway ID. |
| 37 | + |
| 38 | +## Attributes Reference |
| 39 | + |
| 40 | +In addition to all arguments above, the following attributes are exported: |
| 41 | + |
| 42 | +* `id` - ID of the resource. |
| 43 | +* `create_time` - Create time. |
| 44 | +* `route_id` - Route ID. |
| 45 | +* `type` - Route type. Default value: Static. |
| 46 | +* `update_time` - Update time. |
| 47 | + |
| 48 | + |
| 49 | +## Import |
| 50 | + |
| 51 | +VPN gateway route can be imported using the id, the id format must be '{vpn_gateway_id}#{route_id}', e.g. |
| 52 | + |
| 53 | +``` |
| 54 | +$ terraform import tencentcloud_vpn_gateway_route.route1 vpngw-ak9sjem2#vpngw-8ccsnclt |
| 55 | +``` |
| 56 | + |
0 commit comments