Merge pull request #11474 from hashicorp/b-fix-aws-alb-import
provider/aws: Import aws_alb_listener_rule fix
This commit is contained in:
commit
9cdd7547e1
|
@ -144,10 +144,15 @@ func resourceAwsAlbListenerRuleRead(d *schema.ResourceData, meta interface{}) er
|
||||||
rule := resp.Rules[0]
|
rule := resp.Rules[0]
|
||||||
|
|
||||||
d.Set("arn", rule.RuleArn)
|
d.Set("arn", rule.RuleArn)
|
||||||
if priority, err := strconv.Atoi(*rule.Priority); err != nil {
|
// Rules are evaluated in priority order, from the lowest value to the highest value. The default rule has the lowest priority.
|
||||||
return errwrap.Wrapf("Cannot convert rule priority %q to int: {{err}}", err)
|
if *rule.Priority == "default" {
|
||||||
|
d.Set("priority", 99999)
|
||||||
} else {
|
} else {
|
||||||
d.Set("priority", priority)
|
if priority, err := strconv.Atoi(*rule.Priority); err != nil {
|
||||||
|
return errwrap.Wrapf("Cannot convert rule priority %q to int: {{err}}", err)
|
||||||
|
} else {
|
||||||
|
d.Set("priority", priority)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
actions := make([]interface{}, len(rule.Actions))
|
actions := make([]interface{}, len(rule.Actions))
|
||||||
|
|
Loading…
Reference in New Issue