Skip to content

Commit

Permalink
resource/aws_globalaccelerator_accelerator: Remove deprecated (helper…
Browse files Browse the repository at this point in the history
…/schema.ResourceData).Partial() and (helper/schema.ResourceData).SetPartial() (#12472)

Reference: #12083
Reference: #12087

Previously:

```
aws/resource_aws_globalaccelerator_accelerator.go:265:2: R007: deprecated (schema.ResourceData).Partial
aws/resource_aws_globalaccelerator_accelerator.go:285:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_globalaccelerator_accelerator.go:286:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_globalaccelerator_accelerator.go:287:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_globalaccelerator_accelerator.go:304:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_globalaccelerator_accelerator.go:314:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_globalaccelerator_accelerator.go:317:2: R007: deprecated (schema.ResourceData).Partial
```

Output from acceptance testing:

```
--- PASS: TestAccAwsGlobalAcceleratorAccelerator_basic (55.91s)
--- PASS: TestAccAwsGlobalAcceleratorAccelerator_update (84.82s)
--- PASS: TestAccAwsGlobalAcceleratorAccelerator_tags (92.89s)
--- PASS: TestAccAwsGlobalAcceleratorAccelerator_attributes (97.79s)
```
  • Loading branch information
bflad authored Mar 30, 2020
1 parent 063fde1 commit 7d1cdbf
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions aws/resource_aws_globalaccelerator_accelerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ func resourceAwsGlobalAcceleratorAcceleratorRetrieve(conn *globalaccelerator.Glo
func resourceAwsGlobalAcceleratorAcceleratorUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).globalacceleratorconn

d.Partial(true)

if d.HasChange("name") || d.HasChange("ip_address_type") || d.HasChange("enabled") {
opts := &globalaccelerator.UpdateAcceleratorInput{
AcceleratorArn: aws.String(d.Id()),
Expand All @@ -282,10 +280,6 @@ func resourceAwsGlobalAcceleratorAcceleratorUpdate(d *schema.ResourceData, meta
return fmt.Errorf("Error updating Global Accelerator accelerator: %s", err)
}

d.SetPartial("name")
d.SetPartial("ip_address_type")
d.SetPartial("enabled")

err = resourceAwsGlobalAcceleratorAcceleratorWaitForDeployedState(conn, d.Id())
if err != nil {
return err
Expand All @@ -298,10 +292,7 @@ func resourceAwsGlobalAcceleratorAcceleratorUpdate(d *schema.ResourceData, meta
if err != nil {
return err
}

}

d.SetPartial("attributes")
}

if d.HasChange("tags") {
Expand All @@ -310,12 +301,8 @@ func resourceAwsGlobalAcceleratorAcceleratorUpdate(d *schema.ResourceData, meta
if err := keyvaluetags.GlobalacceleratorUpdateTags(conn, d.Id(), o, n); err != nil {
return fmt.Errorf("error updating Global Accelerator accelerator (%s) tags: %s", d.Id(), err)
}

d.SetPartial("tags")
}

d.Partial(false)

return resourceAwsGlobalAcceleratorAcceleratorRead(d, meta)
}

Expand Down

0 comments on commit 7d1cdbf

Please sign in to comment.