Skip to content

Commit

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

Reference: #12083
Reference: #12087

Previously:

```
aws/resource_aws_qldb_ledger.go:159:2: R007: deprecated (schema.ResourceData).Partial
aws/resource_aws_qldb_ledger.go:175:3: R008: deprecated (schema.ResourceData).SetPartial
aws/resource_aws_qldb_ledger.go:185:2: R007: deprecated (schema.ResourceData).Partial
```

Output from acceptance testing:

```
--- PASS: TestAccAWSQLDBLedger_basic (47.45s)
--- PASS: TestAccAWSQLDBLedger_Tags (69.25s)
```
  • Loading branch information
bflad authored Mar 30, 2020
1 parent 7d1cdbf commit 0969535
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions aws/resource_aws_qldb_ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ func resourceAwsQLDBLedgerRead(d *schema.ResourceData, meta interface{}) error {
func resourceAwsQLDBLedgerUpdate(d *schema.ResourceData, meta interface{}) error {
conn := meta.(*AWSClient).qldbconn

// Turn on partial mode
d.Partial(true)

if d.HasChange("deletion_protection") {
val := d.Get("deletion_protection").(bool)
modifyOpts := &qldb.UpdateLedgerInput{
Expand All @@ -171,8 +168,6 @@ func resourceAwsQLDBLedgerUpdate(d *schema.ResourceData, meta interface{}) error

return err
}

d.SetPartial("deletion_protection")
}

if d.HasChange("tags") {
Expand All @@ -182,7 +177,6 @@ func resourceAwsQLDBLedgerUpdate(d *schema.ResourceData, meta interface{}) error
}
}

d.Partial(false)
return resourceAwsQLDBLedgerRead(d, meta)
}

Expand Down

0 comments on commit 0969535

Please sign in to comment.