Skip to content

Commit

Permalink
resource/aws_lb_listener: Remove deprecated (helper/schema.ResourceDa…
Browse files Browse the repository at this point in the history
…ta).Partial() and (helper/schema.ResourceData).SetPartial() (hashicorp#12468)

Reference: hashicorp#12083
Reference: hashicorp#12087

Previously:

```
aws/resource_aws_lb_listener_rule.go:1083:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_lb_listener_rule.go:1093:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_lb_listener_rule.go:1107:2: R007: deprecated (schema.ResourceData).Partial
aws/resource_aws_lb_listener_rule.go:931:2: R007: deprecated (schema.ResourceData).Partial
aws/resource_aws_lb_listener_rule.go:948:3: R008: deprecated (schema.ResourceData).SetPartial
```

Output from acceptance testing:

```
--- PASS: TestAccAWSLBListenerRule_Action_Order (192.70s)
--- PASS: TestAccAWSLBListenerRule_Action_Order_Recreates (223.40s)
--- PASS: TestAccAWSLBListenerRule_basic (267.91s)
--- PASS: TestAccAWSLBListenerRule_changeListenerRuleArnForcesNew (216.77s)
--- PASS: TestAccAWSLBListenerRule_cognito (211.46s)
--- PASS: TestAccAWSLBListenerRule_conditionAttributesCount (29.28s)
--- PASS: TestAccAWSLBListenerRule_conditionHostHeader (191.30s)
--- PASS: TestAccAWSLBListenerRule_conditionHostHeader_deprecated (190.31s)
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader (181.36s)
--- PASS: TestAccAWSLBListenerRule_conditionHttpHeader_invalid (2.67s)
--- PASS: TestAccAWSLBListenerRule_conditionHttpRequestMethod (180.78s)
--- PASS: TestAccAWSLBListenerRule_conditionMultiple (219.93s)
--- PASS: TestAccAWSLBListenerRule_conditionPathPattern (221.77s)
--- PASS: TestAccAWSLBListenerRule_conditionPathPattern_deprecated (220.00s)
--- PASS: TestAccAWSLBListenerRule_conditionQueryString (191.65s)
--- PASS: TestAccAWSLBListenerRule_conditionSourceIp (275.03s)
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMixed (284.65s)
--- PASS: TestAccAWSLBListenerRule_conditionUpdateMultiple (258.87s)
--- PASS: TestAccAWSLBListenerRule_conditionUpdatePathPattern_deprecated (355.25s)
--- PASS: TestAccAWSLBListenerRule_fixedResponse (217.28s)
--- PASS: TestAccAWSLBListenerRule_multipleConditionThrowsError (2.66s)
--- PASS: TestAccAWSLBListenerRule_oidc (188.46s)
--- PASS: TestAccAWSLBListenerRule_priority (406.08s)
--- PASS: TestAccAWSLBListenerRule_redirect (189.54s)
--- PASS: TestAccAWSLBListenerRule_updateFixedResponse (222.80s)
--- PASS: TestAccAWSLBListenerRule_updateRulePriority (225.24s)
```
  • Loading branch information
bflad authored and adamdecaf committed May 28, 2020
1 parent ac0e759 commit 2dbf129
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions aws/resource_aws_lb_listener_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,6 @@ func resourceAwsLbListenerRuleRead(d *schema.ResourceData, meta interface{}) err
func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) error {
elbconn := meta.(*AWSClient).elbv2conn

d.Partial(true)

if d.HasChange("priority") {
params := &elbv2.SetRulePrioritiesInput{
RulePriorities: []*elbv2.RulePriorityPair{
Expand All @@ -944,8 +942,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e
if err != nil {
return err
}

d.SetPartial("priority")
}

requestUpdate := false
Expand Down Expand Up @@ -1080,7 +1076,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e
params.Actions[i] = action
}
requestUpdate = true
d.SetPartial("action")
}

if d.HasChange("condition") {
Expand All @@ -1090,7 +1085,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e
return err
}
requestUpdate = true
d.SetPartial("condition")
}

if requestUpdate {
Expand All @@ -1104,8 +1098,6 @@ func resourceAwsLbListenerRuleUpdate(d *schema.ResourceData, meta interface{}) e
}
}

d.Partial(false)

return resourceAwsLbListenerRuleRead(d, meta)
}

Expand Down

0 comments on commit 2dbf129

Please sign in to comment.