Skip to content

Commit

Permalink
resource/aws_route53_zone: Remove deprecated (helper/schema.ResourceD…
Browse files Browse the repository at this point in the history
…ata).Partial() and (helper/schema.ResourceData).SetPartial() (hashicorp#12475)

Reference: hashicorp#12083
Reference: hashicorp#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)
```
  • Loading branch information
bflad authored and adamdecaf committed May 28, 2020
1 parent 7883e69 commit 51ebf95
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions aws/resource_aws_route53_zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand All @@ -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") {
Expand Down Expand Up @@ -298,12 +294,8 @@ func resourceAwsRoute53ZoneUpdate(d *schema.ResourceData, meta interface{}) erro
return err
}
}

d.SetPartial("vpc")
}

d.Partial(false)

return resourceAwsRoute53ZoneRead(d, meta)
}

Expand Down

0 comments on commit 51ebf95

Please sign in to comment.