diff --git a/docs/data-sources/lbpool.md b/docs/data-sources/lbpool.md index 5314d19..a407ad5 100644 --- a/docs/data-sources/lbpool.md +++ b/docs/data-sources/lbpool.md @@ -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)) diff --git a/docs/resources/lbpool.md b/docs/resources/lbpool.md index 87bb682..d995e4e 100644 --- a/docs/resources/lbpool.md +++ b/docs/resources/lbpool.md @@ -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' diff --git a/gcore/data_source_gcore_lbpool.go b/gcore/data_source_gcore_lbpool.go index 7d117d4..ba0cf3d 100644 --- a/gcore/data_source_gcore_lbpool.go +++ b/gcore/data_source_gcore_lbpool.go @@ -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, diff --git a/gcore/resource_gcore_lbpool.go b/gcore/resource_gcore_lbpool.go index 43a74fb..286f7e1 100644 --- a/gcore/resource_gcore_lbpool.go +++ b/gcore/resource_gcore_lbpool.go @@ -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{ diff --git a/go.mod b/go.mod index 9b3d449..b518dd2 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 5214a05..e672413 100644 --- a/go.sum +++ b/go.sum @@ -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=