From c5350a637c475bf2d599c5769e919494b746685c Mon Sep 17 00:00:00 2001 From: Brian Flad Date: Tue, 25 Feb 2020 19:21:28 -0500 Subject: [PATCH] resource/aws_elastic_beanstalk_environment: Fixes for tfproviderlint R002 (#11945) Reference: https://github.com/terraform-providers/terraform-provider-aws/issues/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) ``` --- aws/resource_aws_elastic_beanstalk_environment.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/resource_aws_elastic_beanstalk_environment.go b/aws/resource_aws_elastic_beanstalk_environment.go index b6fc7877b16..5814852c248 100644 --- a/aws/resource_aws_elastic_beanstalk_environment.go +++ b/aws/resource_aws_elastic_beanstalk_environment.go @@ -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 }