Skip to content

Commit

Permalink
resource/aws_codestarnotifications_notification_rule: Remove deprecat…
Browse files Browse the repository at this point in the history
…ed (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() (#12469)

Reference: #12083
Reference: #12087

Previously:

```
aws/resource_aws_codestarnotifications_notification_rule.go:236:2: R007: deprecated (schema.ResourceData).Partial
aws/resource_aws_codestarnotifications_notification_rule.go:251:2: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_codestarnotifications_notification_rule.go:252:2: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_codestarnotifications_notification_rule.go:253:2: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_codestarnotifications_notification_rule.go:254:2: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_codestarnotifications_notification_rule.go:270:2: R007: deprecated (schema.ResourceData).Partial
```

Output from acceptance testing:

```
--- PASS: TestAccAWSCodeStarNotificationsNotificationRule_Basic (26.58s)
--- PASS: TestAccAWSCodeStarNotificationsNotificationRule_EventTypeIds (49.15s)
--- PASS: TestAccAWSCodeStarNotificationsNotificationRule_Status (61.55s)
--- PASS: TestAccAWSCodeStarNotificationsNotificationRule_Tags (49.81s)
--- PASS: TestAccAWSCodeStarNotificationsNotificationRule_Targets (48.94s)
```
  • Loading branch information
bflad committed Apr 1, 2020
1 parent 4094649 commit c46c4dc
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions aws/resource_aws_codestarnotifications_notification_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ func cleanupCodeStarNotificationsNotificationRuleTargets(conn *codestarnotificat
func resourceAwsCodeStarNotificationsNotificationRuleUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).codestarnotificationsconn

d.Partial(true)

params := &codestarnotifications.UpdateNotificationRuleInput{
Arn: aws.String(d.Id()),
DetailType: aws.String(d.Get("detail_type").(string)),
Expand All @@ -248,11 +246,6 @@ func resourceAwsCodeStarNotificationsNotificationRuleUpdate(d *schema.ResourceDa
return fmt.Errorf("error updating codestar notification rule: %s", err)
}

d.SetPartial("detail_type")
d.SetPartial("event_type_ids")
d.SetPartial("name")
d.SetPartial("target")

if d.HasChange("tags") {
o, n := d.GetChange("tags")
if err := keyvaluetags.CodestarnotificationsUpdateTags(conn, d.Id(), o, n); err != nil {
Expand All @@ -267,8 +260,6 @@ func resourceAwsCodeStarNotificationsNotificationRuleUpdate(d *schema.ResourceDa
}
}

d.Partial(false)

return resourceAwsCodeStarNotificationsNotificationRuleRead(d, meta)
}

Expand Down

0 comments on commit c46c4dc

Please sign in to comment.