Skip to content

Commit

Permalink
Merge pull request #3379 from loivis/lb-listener-rule-maximum-priority
Browse files Browse the repository at this point in the history
resource/lb_listener_rule: update maximum priority value to 50000
  • Loading branch information
bflad authored Feb 16, 2018
2 parents 9aa9ef1 + 8e33671 commit dfe9d7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions aws/resource_aws_lb_listener_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err
d.Set("priority", 99999)
} else {
if priority, err := strconv.Atoi(*rule.Priority); err != nil {
return errwrap.Wrapf("Cannot convert rule priority %q to int: {{err}}", err)
return fmt.Errorf("Cannot convert rule priority %q to int: {{err}}", err)
} else {
d.Set("priority", priority)
}
Expand Down Expand Up @@ -278,8 +278,8 @@ func resourceAwsLbListenerRuleDelete(d *schema.ResourceData, meta interface{}) e

func validateAwsLbListenerRulePriority(v interface{}, k string) (ws []string, errors []error) {
value := v.(int)
if value < 1 || value > 99999 {
errors = append(errors, fmt.Errorf("%q must be in the range 1-99999", k))
if value < 1 || (value > 50000 && value != 99999) {
errors = append(errors, fmt.Errorf("%q must be in the range 1-50000 for normal rule or 99999 for default rule", k))
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/lb_listener_rule.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ resource "aws_lb_listener_rule" "host_based_routing" {
The following arguments are supported:

* `listener_arn` - (Required, Forces New Resource) The ARN of the listener to which to attach the rule.
* `priority` - (Required) The priority for the rule. A listener can't have multiple rules with the same priority.
* `priority` - (Required) The priority for the rule between `1` and `50000`. A listener can't have multiple rules with the same priority.
* `action` - (Required) An Action block. Action blocks are documented below.
* `condition` - (Required) A Condition block. Condition blocks are documented below.

Expand Down

0 comments on commit dfe9d7a

Please sign in to comment.