Skip to content

Commit

Permalink
Merge pull request #85 from volcengine/fix/clbListener
Browse files Browse the repository at this point in the history
Fix/clb listener
  • Loading branch information
xuyaming0800 authored Apr 24, 2023
2 parents 1d620d1 + b4acbc3 commit 7766c09
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/common_volcengine_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ package common

const (
TerraformProviderName = "terraform-provider-volcengine"
TerraformProviderVersion = "0.0.69"
TerraformProviderVersion = "0.0.70"
)
10 changes: 10 additions & 0 deletions volcengine/clb/listener/service_volcengine_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,11 @@ func (s *VolcengineListenerService) CreateResource(resourceData *schema.Resource
},
"health_check": {
ConvertType: ve.ConvertListUnique,
NextLevelConvert: map[string]ve.RequestConvert{
"un_healthy_threshold": {
TargetField: "UnhealthyThreshold",
},
},
},
},
BeforeCall: func(d *schema.ResourceData, client *ve.SdkClient, call ve.SdkCall) (bool, error) {
Expand Down Expand Up @@ -300,6 +305,11 @@ func (s *VolcengineListenerService) ModifyResource(resourceData *schema.Resource
},
"health_check": {
ConvertType: ve.ConvertListUnique,
NextLevelConvert: map[string]ve.RequestConvert{
"un_healthy_threshold": {
TargetField: "UnhealthyThreshold",
},
},
},
},
BeforeCall: func(d *schema.ResourceData, client *ve.SdkClient, call ve.SdkCall) (bool, error) {
Expand Down
4 changes: 2 additions & 2 deletions volcengine/vpc/route_entry/resource_volcengine_route_entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func ResourceVolcengineRouteEntry() *schema.Resource {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: "The type of the next hop, Optional choice contains `Instance`, `NetworkInterface`, `NatGW`, `VpnGW`.",
ValidateFunc: validation.StringInSlice([]string{"Instance", "NetworkInterface", "NatGW", "VpnGW"}, false),
Description: "The type of the next hop, Optional choice contains `Instance`, `NetworkInterface`, `NatGW`, `VpnGW`, `TransitRouter`.",
ValidateFunc: validation.StringInSlice([]string{"Instance", "NetworkInterface", "NatGW", "VpnGW", "TransitRouter"}, false),
},
"next_hop_id": {
Type: schema.TypeString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,13 @@ func ResourceVolcengineVpnConnection() *schema.Resource {
Optional: true,
Description: "The project name of the VPN connection.",
},
"attach_type": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Default: "VpnGateway",
Description: "The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.",
},
},
}
dataSource := DataSourceVolcengineVpnConnections().Schema["vpn_connections"].Elem.(*schema.Resource).Schema
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/route_entry.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ resource "volcengine_route_entry" "foo" {
The following arguments are supported:
* `destination_cidr_block` - (Required, ForceNew) The destination CIDR block of the route entry.
* `next_hop_id` - (Required, ForceNew) The id of the next hop.
* `next_hop_type` - (Required, ForceNew) The type of the next hop, Optional choice contains `Instance`, `NetworkInterface`, `NatGW`, `VpnGW`.
* `next_hop_type` - (Required, ForceNew) The type of the next hop, Optional choice contains `Instance`, `NetworkInterface`, `NatGW`, `VpnGW`, `TransitRouter`.
* `route_table_id` - (Required, ForceNew) The id of the route table.
* `description` - (Optional) The description of the route entry.
* `route_entry_name` - (Optional) The name of the route entry.
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/vpn_connection.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ The following arguments are supported:
* `local_subnet` - (Required) The local subnet of the VPN connection.
* `remote_subnet` - (Required) The remote subnet of the VPN connection.
* `vpn_gateway_id` - (Required, ForceNew) The ID of the vpn gateway.
* `attach_type` - (Optional, ForceNew) The attach type of the VPN connection, the value can be VpnGateway or TransitRouter.
* `description` - (Optional) The description of the VPN connection.
* `dpd_action` - (Optional) The dpd action of the VPN connection.
* `ike_config_auth_alg` - (Optional) The auth alg of the ike config of the VPN connection.
Expand All @@ -66,7 +67,6 @@ In addition to all arguments above, the following attributes are exported:
* `id` - ID of the resource.
* `account_id` - The account ID of the VPN connection.
* `attach_status` - The IPsec attach status.
* `attach_type` - The IPsec attach type.
* `connect_status` - The connect status of the VPN connection.
* `creation_time` - The create time of VPN connection.
* `status` - The status of the VPN connection.
Expand Down

0 comments on commit 7766c09

Please sign in to comment.