From 6bef8d57055083bce107f858d19609f2b0426a58 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Thu, 19 Mar 2020 04:32:42 -0400 Subject: [PATCH] resource/aws_codestarnotifications_notification_rule: Remove deprecated (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/12083 Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/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) ``` --- ...source_aws_codestarnotifications_notification_rule.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/aws/resource_aws_codestarnotifications_notification_rule.go b/aws/resource_aws_codestarnotifications_notification_rule.go index feb4d21602b..a981ac91534 100644 --- a/aws/resource_aws_codestarnotifications_notification_rule.go +++ b/aws/resource_aws_codestarnotifications_notification_rule.go @@ -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)), @@ -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 { @@ -267,8 +260,6 @@ func resourceAwsCodeStarNotificationsNotificationRuleUpdate(d *schema.ResourceDa } } - d.Partial(false) - return resourceAwsCodeStarNotificationsNotificationRuleRead(d, meta) }