Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update tencentcloud_route_table_entry next_type #1461

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/1461.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_route_table_entry: update the `next_type` value
```
4 changes: 4 additions & 0 deletions tencentcloud/extension_vpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@ const GATE_WAY_TYPE_VPN = "VPN"
const GATE_WAY_TYPE_DIRECTCONNECT = "DIRECTCONNECT"
const GATE_WAY_TYPE_PEERCONNECTION = "PEERCONNECTION"
const GATE_WAY_TYPE_SSLVPN = "SSLVPN"
const GATE_WAY_TYPE_HAVIP = "HAVIP"
const GATE_WAY_TYPE_NAT = "NAT"
const GATE_WAY_TYPE_NORMAL_CVM = "NORMAL_CVM"
const GATE_WAY_TYPE_EIP = "EIP"
const GATE_WAY_TYPE_CCN = "CCN"
const GATE_WAY_TYPE_LOCAL_GATEWAY = "LOCAL_GATEWAY"

var ALL_GATE_WAY_TYPES = []string{
GATE_WAY_TYPE_CVM,
GATE_WAY_TYPE_VPN,
GATE_WAY_TYPE_DIRECTCONNECT,
GATE_WAY_TYPE_PEERCONNECTION,
GATE_WAY_TYPE_SSLVPN,
GATE_WAY_TYPE_HAVIP,
GATE_WAY_TYPE_NAT,
GATE_WAY_TYPE_NORMAL_CVM,
GATE_WAY_TYPE_EIP,
GATE_WAY_TYPE_CCN,
GATE_WAY_TYPE_LOCAL_GATEWAY,
}

const VPC_SERVICE_TYPE = "vpc"
Expand Down
2 changes: 1 addition & 1 deletion tencentcloud/resource_tc_route_table_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func resourceTencentCloudVpcRouteEntry() *schema.Resource {
Required: true,
ForceNew: true,
ValidateFunc: validateAllowedStringValue(ALL_GATE_WAY_TYPES),
Description: "Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `SSLVPN`, `NAT`, `NORMAL_CVM`, `EIP` and `CCN`.",
Description: "Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `HAVIP`, `NAT`, `NORMAL_CVM`, `EIP` and `LOCAL_GATEWAY`.",
},
"next_hub": {
Type: schema.TypeString,
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/route_table_entry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The following arguments are supported:

* `destination_cidr_block` - (Required, String, ForceNew) Destination address block.
* `next_hub` - (Required, String, ForceNew) ID of next-hop gateway. Note: when `next_type` is EIP, GatewayId should be `0`.
* `next_type` - (Required, String, ForceNew) Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `SSLVPN`, `NAT`, `NORMAL_CVM`, `EIP` and `CCN`.
* `next_type` - (Required, String, ForceNew) Type of next-hop. Valid values: `CVM`, `VPN`, `DIRECTCONNECT`, `PEERCONNECTION`, `HAVIP`, `NAT`, `NORMAL_CVM`, `EIP` and `LOCAL_GATEWAY`.
* `route_table_id` - (Required, String, ForceNew) ID of routing table to which this entry belongs.
* `description` - (Optional, String, ForceNew) Description of the routing table entry.
* `disabled` - (Optional, Bool) Whether the entry is disabled, default is `false`.
Expand Down