Skip to content

Commit

Permalink
resource/aws_glacier_vault: Fixes for tfproviderlint R002
Browse files Browse the repository at this point in the history
Reference: #9952

Remove pointer value dereferences, which can cause potential panics and are extraneous as `Set()` automatically handles pointer types including when `nil`.

Previously:

```
aws/resource_aws_glacier_vault.go:105:20: R002: ResourceData.Set() pointer value dereference is extraneous
```

Output from acceptance testing:

```
--- PASS: TestAccAWSGlacierVault_basic (22.38s)
--- PASS: TestAccAWSGlacierVault_full (26.27s)
--- PASS: TestAccAWSGlacierVault_RemoveNotifications (38.22s)
```
  • Loading branch information
bflad committed Feb 6, 2020
1 parent 18b6e4f commit 7fc74ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_glacier_vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func resourceAwsGlacierVaultCreate(d *schema.ResourceData, meta interface{}) err
}

d.SetId(d.Get("name").(string))
d.Set("location", *out.Location)
d.Set("location", out.Location)

return resourceAwsGlacierVaultUpdate(d, meta)
}
Expand Down

0 comments on commit 7fc74ef

Please sign in to comment.