Skip to content

Commit

Permalink
Fix error in attributes value for healthy_threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
outscale-toa committed May 31, 2024
1 parent 1ca482d commit 06f16c5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions outscale/resource_outscale_load_balancer_attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func ResourceOutscaleLoadBalancerAttributes() *schema.Resource {
ForceNew: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
htVal := val.(int)
if htVal < 5 || htVal > 600 {
errs = append(errs, fmt.Errorf("%q must be between 5 and 600 inclusive, got: %d", key, htVal))
if htVal < 2 || htVal > 10 {
errs = append(errs, fmt.Errorf("%q must be between 2 and 10 included, got: %d", key, htVal))
}
return
},
Expand All @@ -88,7 +88,7 @@ func ResourceOutscaleLoadBalancerAttributes() *schema.Resource {
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
uhtVal := val.(int)
if uhtVal < 2 || uhtVal > 10 {
errs = append(errs, fmt.Errorf("%q must be between 2 and 10 inclusive, got: %d", key, uhtVal))
errs = append(errs, fmt.Errorf("%q must be between 2 and 10 included, got: %d", key, uhtVal))
}
return
},
Expand All @@ -111,7 +111,7 @@ func ResourceOutscaleLoadBalancerAttributes() *schema.Resource {
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
portVal := val.(int)
if portVal < utils.MinPort || portVal > utils.MaxPort {
errs = append(errs, fmt.Errorf("%q must be between %d and %d inclusive, got: %d", key, utils.MinPort, utils.MaxPort, portVal))
errs = append(errs, fmt.Errorf("%q must be between %d and %d included, got: %d", key, utils.MinPort, utils.MaxPort, portVal))
}
return
},
Expand All @@ -129,7 +129,7 @@ func ResourceOutscaleLoadBalancerAttributes() *schema.Resource {
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
ciVal := val.(int)
if ciVal < 5 || ciVal > 600 {
errs = append(errs, fmt.Errorf("%q must be between 5 and 600 inclusive, got: %d", key, ciVal))
errs = append(errs, fmt.Errorf("%q must be between 5 and 600 included, got: %d", key, ciVal))
}
return
},
Expand All @@ -141,8 +141,8 @@ func ResourceOutscaleLoadBalancerAttributes() *schema.Resource {
ForceNew: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
tVal := val.(int)
if tVal < 5 || tVal > 60 {
errs = append(errs, fmt.Errorf("%q must be between 5 and 60 inclusive, got: %d", key, tVal))
if tVal < 2 || tVal > 60 {
errs = append(errs, fmt.Errorf("%q must be between 2 and 60 included, got: %d", key, tVal))
}
return
},
Expand Down

0 comments on commit 06f16c5

Please sign in to comment.