Skip to content

Commit

Permalink
resource/aws_elastic_beanstalk_environment: Fixes for tfproviderlint …
Browse files Browse the repository at this point in the history
…R002 (#11945)

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_elastic_beanstalk_environment.go:592:26: R002: ResourceData.Set() pointer value dereference is extraneous
```

Output from acceptance testing:

```
--- PASS: TestAccAWSBeanstalkEnv_resource (374.31s)
--- PASS: TestAccAWSBeanstalkEnv_cname_prefix (396.88s)
--- PASS: TestAccAWSBeanstalkEnv_platformArn (407.51s)
--- PASS: TestAccAWSBeanstalkEnv_basic (470.63s)
--- PASS: TestAccAWSBeanstalkEnv_settingWithJsonValue (510.72s)
--- PASS: TestAccAWSBeanstalkEnv_tier (539.81s)
--- PASS: TestAccAWSBeanstalkEnv_config (573.89s)
--- PASS: TestAccAWSBeanstalkEnv_template_change (637.28s)
--- PASS: TestAccAWSBeanstalkEnv_version_label (640.37s)
--- PASS: TestAccAWSBeanstalkEnv_tags (711.19s)
--- PASS: TestAccAWSBeanstalkEnv_settings_update (890.65s)
```
  • Loading branch information
bflad authored Feb 26, 2020
1 parent e9b8374 commit c5350a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aws/resource_aws_elastic_beanstalk_environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func resourceAwsElasticBeanstalkEnvironmentRead(d *schema.ResourceData, meta int
return err
}

if err := d.Set("tier", *env.Tier.Name); err != nil {
if err := d.Set("tier", env.Tier.Name); err != nil {
return err
}

Expand Down

0 comments on commit c5350a6

Please sign in to comment.