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

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 committed Feb 6, 2020
1 parent 18b6e4f commit c7c3eb4
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 c7c3eb4

Please sign in to comment.