Skip to content

Commit

Permalink
GCLOUD2-14220: Remove support of SOURCE_IP_PORT (it never worked) (#104)
Browse files Browse the repository at this point in the history
* GCLOUD2-14220: Remove support of SOURCE_IP_PORT (it never worked)
  • Loading branch information
ArtsiomAntropau authored Apr 27, 2024
1 parent 1b04432 commit 5ef2821
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/lbpool.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ output "view" {

- `health_monitor` (List of Object) Health Monitor settings for defining health state of members inside this pool. (see [below for nested schema](#nestedatt--health_monitor))
- `id` (String) The ID of this resource.
- `lb_algorithm` (String) Available values is 'ROUND_ROBIN', 'LEAST_CONNECTIONS', 'SOURCE_IP', 'SOURCE_IP_PORT'
- `lb_algorithm` (String) Available values is 'ROUND_ROBIN', 'LEAST_CONNECTIONS', 'SOURCE_IP'
- `protocol` (String) Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'
- `session_persistence` (List of Object) Pool session persistence tells the load balancer to attempt to send future requests from a client to the same backend member as the initial request. (see [below for nested schema](#nestedatt--session_persistence))

Expand Down
2 changes: 1 addition & 1 deletion docs/resources/lbpool.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ resource "gcore_lbpool" "proxy_8080" {

### Required

- `lb_algorithm` (String) Available values is 'ROUND_ROBIN', 'LEAST_CONNECTIONS', 'SOURCE_IP', 'SOURCE_IP_PORT'
- `lb_algorithm` (String) Available values is 'ROUND_ROBIN', 'LEAST_CONNECTIONS', 'SOURCE_IP'
- `name` (String) Pool name.
- `protocol` (String) Available values are 'HTTP', 'HTTPS', 'TCP', 'UDP', 'PROXY', 'PROXYV2'

Expand Down
2 changes: 1 addition & 1 deletion gcore/data_source_gcore_lbpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func dataSourceLBPool() *schema.Resource {
"lb_algorithm": &schema.Schema{
Type: schema.TypeString,
Computed: true,
Description: fmt.Sprintf("Available values is '%s', '%s', '%s', '%s'", types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP, types.LoadBalancerAlgorithmSourceIPPort),
Description: fmt.Sprintf("Available values is '%s', '%s', '%s'", types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP),
},
"protocol": &schema.Schema{
Type: schema.TypeString,
Expand Down
6 changes: 3 additions & 3 deletions gcore/resource_gcore_lbpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ func resourceLBPool() *schema.Resource {
"lb_algorithm": &schema.Schema{
Type: schema.TypeString,
Required: true,
Description: fmt.Sprintf("Available values is '%s', '%s', '%s', '%s'", types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP, types.LoadBalancerAlgorithmSourceIPPort),
Description: fmt.Sprintf("Available values is '%s', '%s', '%s'", types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP),
ValidateDiagFunc: func(val interface{}, key cty.Path) diag.Diagnostics {
v := val.(string)
switch types.LoadBalancerAlgorithm(v) {
case types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP, types.LoadBalancerAlgorithmSourceIPPort:
case types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP:
return diag.Diagnostics{}
}
return diag.Errorf("wrong type %s, available values is '%s', '%s', '%s', '%s'", v, types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP, types.LoadBalancerAlgorithmSourceIPPort)
return diag.Errorf("wrong type %s, available values is '%s', '%s', '%s'", v, types.LoadBalancerAlgorithmRoundRobin, types.LoadBalancerAlgorithmLeastConnections, types.LoadBalancerAlgorithmSourceIP)
},
},
"protocol": &schema.Schema{
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/G-Core/gcore-dns-sdk-go v0.2.9
github.com/G-Core/gcore-storage-sdk-go v0.1.34
github.com/G-Core/gcorelabscdn-go v1.0.13
github.com/G-Core/gcorelabscloud-go v0.7.8
github.com/G-Core/gcorelabscloud-go v0.7.11
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/terraform-plugin-sdk/v2 v2.27.0
github.com/mitchellh/mapstructure v1.5.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/G-Core/gcore-storage-sdk-go v0.1.34 h1:0GPQfz1kA6mQi6fiisGsh0Um4H9PZe
github.com/G-Core/gcore-storage-sdk-go v0.1.34/go.mod h1:BUAEZZZJJt/+luRFunqziv3+JnbVMLbQXDWz9kV8Te8=
github.com/G-Core/gcorelabscdn-go v1.0.13 h1:+kDeK1wTAT3aMlljZXa12wljqYzBgooPx38JMZj7kZw=
github.com/G-Core/gcorelabscdn-go v1.0.13/go.mod h1:iSGXaTvZBzDHQW+rKFS918BgFVpONcyLEijwh8WsXpE=
github.com/G-Core/gcorelabscloud-go v0.7.8 h1:Anwc3WGZxtgfdH2Tt4lrrQFAlP5vWBEr+22Vqo2iiAc=
github.com/G-Core/gcorelabscloud-go v0.7.8/go.mod h1:13Z1USxlxPbDFuYQyWqfNexlk4kUvOYTXbnvV/Z1lZo=
github.com/G-Core/gcorelabscloud-go v0.7.11 h1:Kc3t990JuSHPilNdFET7c1do9WeAjav/TWmC0NqStp8=
github.com/G-Core/gcorelabscloud-go v0.7.11/go.mod h1:13Z1USxlxPbDFuYQyWqfNexlk4kUvOYTXbnvV/Z1lZo=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg=
Expand Down

0 comments on commit 5ef2821

Please sign in to comment.