From 51ebf9555fef6fd3957a606205b10400f2107ea0 Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Mon, 30 Mar 2020 09:40:33 -0400 Subject: [PATCH] resource/aws_route53_zone: Remove deprecated (helper/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() (#12475) 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_route53_zone.go:245:2: R007: deprecated (schema.ResourceData).Partial aws/resource_aws_route53_zone.go:259:3: R008: deprecated (schema.ResourceData).SetPartial aws/resource_aws_route53_zone.go:302:3: R008: deprecated (schema.ResourceData).SetPartial aws/resource_aws_route53_zone.go:305:2: R007: deprecated (schema.ResourceData).Partial ``` Output from acceptance testing: ``` --- PASS: TestAccAWSRoute53Zone_disappears (46.86s) --- PASS: TestAccAWSRoute53Zone_basic (51.82s) --- PASS: TestAccAWSRoute53Zone_DelegationSetID (54.36s) --- PASS: TestAccAWSRoute53Zone_multiple (55.84s) --- PASS: TestAccAWSRoute53Zone_Comment (63.72s) --- PASS: TestAccAWSRoute53Zone_Tags (76.39s) --- PASS: TestAccAWSRoute53Zone_VPC_Single (100.74s) --- PASS: TestAccAWSRoute53Zone_VPC_Multiple (162.98s) --- PASS: TestAccAWSRoute53Zone_ForceDestroy (183.10s) --- PASS: TestAccAWSRoute53Zone_ForceDestroy_TrailingPeriod (184.32s) --- PASS: TestAccAWSRoute53Zone_VPC_Updates (238.08s) ``` --- aws/resource_aws_route53_zone.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/aws/resource_aws_route53_zone.go b/aws/resource_aws_route53_zone.go index 83ab57f67eb..c9116e010d3 100644 --- a/aws/resource_aws_route53_zone.go +++ b/aws/resource_aws_route53_zone.go @@ -242,8 +242,6 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro conn := meta.(*AWSClient).r53conn region := meta.(*AWSClient).region - d.Partial(true) - if d.HasChange("comment") { input := route53.UpdateHostedZoneCommentInput{ Id: aws.String(d.Id()), @@ -255,8 +253,6 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro if err != nil { return fmt.Errorf("error updating Route53 Hosted Zone (%s) comment: %s", d.Id(), err) } - - d.SetPartial("comment") } if d.HasChange("tags") { @@ -298,12 +294,8 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro return err } } - - d.SetPartial("vpc") } - d.Partial(false) - return resourceAwsRoute53ZoneRead(d, meta) }