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

Fix attributes value #451

Merged
merged 1 commit into from
Jun 10, 2024
Merged
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
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
Loading