hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.18k forks source link

Add Linter for AWS Go SDK Service Client Variable Naming #17906

Closed bflad closed 1 year ago

bflad commented 3 years ago

Community Note

Description

Here is another static analysis item I had worked on some time ago, but for whatever reason never created an issue. The codebase strongly prefers naming the AWS Go SDK service clients in each of the Create/Read/Update/Delete functions as conn for consistency, e.g.

func resourceExampleThingCreate(d *schema.ResourceData, meta interface{}) error {
  conn := meta.(*AWSClient).exampleconn
  // ...
}

There are a few lingering resources that use alternate naming styles that should be standardized. This handling will need file excludes (or code comments) for known cases where multiple clients are required, where typically the convention is then {SERVICE}conn.

Potential Semgrep Rule

  - id: aws-go-sdk-service-client-variable-naming
    languages: [go]
    message: Prefer naming AWS Go SDK service client variable as conn in resources
    paths:
      exclude:
        - aws/internal/generators/
        - awsproviderlint/vendor/
      include:
        - aws/
    patterns:
      - pattern: $VAR = meta.(*AWSClient).$SERVICECLIENT
      - metavariable-regex:
          metavariable: "$SERVICECLIENT"
          regex: ".+conn$"
      - pattern-not: 'conn = meta.(*AWSClient).$SERVICECLIENT'
    severity: WARNING

Current reports:

aws/data_source_aws_caller_identity.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
36: client := meta.(*AWSClient).stsconn

aws/data_source_aws_efs_file_system.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
82: efsconn := meta.(*AWSClient).efsconn

aws/data_source_aws_elasticsearch_domain.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
279:    esconn := meta.(*AWSClient).esconn

aws/data_source_aws_elb.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
198:    elbconn := meta.(*AWSClient).elbconn

aws/data_source_aws_iam_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
62: iamconn := meta.(*AWSClient).iamconn

aws/data_source_aws_iam_instance_profile.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
50: iamconn := meta.(*AWSClient).iamconn

aws/data_source_aws_iam_role.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
61: iamconn := meta.(*AWSClient).iamconn

aws/data_source_aws_iam_server_certificate.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
96: iamconn := meta.(*AWSClient).iamconn

aws/data_source_aws_iam_user.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
44: iamconn := meta.(*AWSClient).iamconn

aws/data_source_aws_launch_configuration.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
217:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
218:    ec2conn := meta.(*AWSClient).ec2conn

aws/data_source_aws_lb_target_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
163:    elbconn := meta.(*AWSClient).elbv2conn

aws/data_source_aws_regions.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
33: connection := meta.(*AWSClient).ec2conn

aws/data_source_aws_ssm_document.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
52: ssmconn := meta.(*AWSClient).ssmconn

aws/data_source_aws_ssm_parameter.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
47: ssmconn := meta.(*AWSClient).ssmconn

aws/data_source_aws_ssm_patch_baseline.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
50: ssmconn := meta.(*AWSClient).ssmconn

aws/opsworks_layers.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
250:            client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
256:            client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
260:            client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
266:            client := meta.(*AWSClient).opsworksconn

aws/resource_aws_acm_certificate.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
254:    acmconn := meta.(*AWSClient).acmconn
--------------------------------------------------------------------------------
294:    acmconn := meta.(*AWSClient).acmconn
--------------------------------------------------------------------------------
456:    acmconn := meta.(*AWSClient).acmconn

aws/resource_aws_acm_certificate_validation.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
45: acmconn := meta.(*AWSClient).acmconn
--------------------------------------------------------------------------------
172:    acmconn := meta.(*AWSClient).acmconn

aws/resource_aws_ami.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
258:    client := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
333:    client := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
444:    client := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
470:    client := meta.(*AWSClient).ec2conn

aws/resource_aws_ami_copy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
236:    client := meta.(*AWSClient).ec2conn

aws/resource_aws_ami_from_instance.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
223:    client := meta.(*AWSClient).ec2conn

aws/resource_aws_app_cookie_stickiness_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
64: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
95: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
187:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_autoscaling_attachment.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
42: asgconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
78: asgconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
129:    asgconn := meta.(*AWSClient).autoscalingconn

aws/resource_aws_autoscaling_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
1571:   elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
1600:   elbv2conn := meta.(*AWSClient).elbv2conn

aws/resource_aws_autoscaling_lifecycle_hook.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
128:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
182:    autoscalingconn := meta.(*AWSClient).autoscalingconn

aws/resource_aws_autoscaling_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
184:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
240:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
257:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
384:    autoscalingconn := meta.(*AWSClient).autoscalingconn

aws/resource_aws_autoscaling_schedule.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
100:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
201:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
218:    autoscalingconn := meta.(*AWSClient).autoscalingconn

aws/resource_aws_budgets_budget_test.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
404:    client := meta.(*AWSClient).budgetconn

aws/resource_aws_db_option_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
126:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
162:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
229:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
305:    rdsconn := meta.(*AWSClient).rdsconn

aws/resource_aws_db_parameter_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
90: rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
124:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
239:    rdsconn := meta.(*AWSClient).rdsconn

aws/resource_aws_db_subnet_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
69: rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
106:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
219:    rdsconn := meta.(*AWSClient).rdsconn

aws/resource_aws_directory_service_directory.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
358:    dsconn := meta.(*AWSClient).dsconn
--------------------------------------------------------------------------------
435:    dsconn := meta.(*AWSClient).dsconn
--------------------------------------------------------------------------------
455:    dsconn := meta.(*AWSClient).dsconn

aws/resource_aws_directory_service_log_subscription.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
37: dsconn := meta.(*AWSClient).dsconn
--------------------------------------------------------------------------------
58: dsconn := meta.(*AWSClient).dsconn
--------------------------------------------------------------------------------
85: dsconn := meta.(*AWSClient).dsconn

aws/resource_aws_dynamodb_global_table.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
60: dynamodbconn := meta.(*AWSClient).dynamodbconn
--------------------------------------------------------------------------------
115:    dynamodbconn := meta.(*AWSClient).dynamodbconn
--------------------------------------------------------------------------------
169:    dynamodbconn := meta.(*AWSClient).dynamodbconn
--------------------------------------------------------------------------------
198:    dynamodbconn := meta.(*AWSClient).dynamodbconn

aws/resource_aws_eip.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
136:    ec2conn := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
195:    ec2conn := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
319:    ec2conn := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
416:    ec2conn := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
485:    ec2conn := meta.(*AWSClient).ec2conn

aws/resource_aws_elastic_beanstalk_application.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
71: beanstalkConn := meta.(*AWSClient).elasticbeanstalkconn
--------------------------------------------------------------------------------
268:    beanstalkConn := meta.(*AWSClient).elasticbeanstalkconn

aws/resource_aws_elb.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
255:    elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
339:    elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
471:    elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
780:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_elb_attachment.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
37: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
76: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
120:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_emr_cluster.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
972:    emrconn := meta.(*AWSClient).emrconn

aws/resource_aws_glue_crawler.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
285:    glueConn := meta.(*AWSClient).glueconn
--------------------------------------------------------------------------------
600:    glueConn := meta.(*AWSClient).glueconn
--------------------------------------------------------------------------------
652:    glueConn := meta.(*AWSClient).glueconn
--------------------------------------------------------------------------------
819:    glueConn := meta.(*AWSClient).glueconn

aws/resource_aws_iam_access_key.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
99: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
170:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
213:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
225:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_account_password_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
78: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
123:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
156:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
51: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
70: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
105:        iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
125:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_group_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
58: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
84: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
131:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_openid_connect_provider.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
50: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
69: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
93: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
111:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
75: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
104:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
203:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
223:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_role.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
156:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
231:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
299:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_role_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
59: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
85: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
125:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_user.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
74: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
103:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
142:    iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
202:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_user_login_profile.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
126:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_user_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
57: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
89: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
129:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_iam_user_ssh_key.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
72: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
93: iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
126:        iamconn := meta.(*AWSClient).iamconn
--------------------------------------------------------------------------------
149:    iamconn := meta.(*AWSClient).iamconn

aws/resource_aws_launch_configuration.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
335:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
336:    ec2conn := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
544:    autoscalingconn := meta.(*AWSClient).autoscalingconn
--------------------------------------------------------------------------------
545:    ec2conn := meta.(*AWSClient).ec2conn
--------------------------------------------------------------------------------
612:    autoscalingconn := meta.(*AWSClient).autoscalingconn

aws/resource_aws_lb.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
553:    ec2conn := meta.(*AWSClient).ec2conn

aws/resource_aws_lb_cookie_stickiness_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
54: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
90: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
151:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_lb_listener.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
382:    elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
573:    elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
745:    elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
924:    elbconn := meta.(*AWSClient).elbv2conn

aws/resource_aws_lb_listener_rule.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
477:    elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
667:    elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
889:    elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
1067:   elbconn := meta.(*AWSClient).elbv2conn

aws/resource_aws_lb_ssl_negotiation_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
73: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
112:    elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
165:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_lb_target_group_attachment.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
49: elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
98: elbconn := meta.(*AWSClient).elbv2conn
--------------------------------------------------------------------------------
128:    elbconn := meta.(*AWSClient).elbv2conn

aws/resource_aws_load_balancer_backend_server_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
43: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
67: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
114:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_load_balancer_listener_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
43: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
67: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
114:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_load_balancer_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
62: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
94: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
149:    elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
196:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_opsworks_application.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
253:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
298:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
332:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
364:    client := meta.(*AWSClient).opsworksconn

aws/resource_aws_opsworks_instance.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
465:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
574:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
737:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
818:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
850:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
888:    client := meta.(*AWSClient).opsworksconn

aws/resource_aws_opsworks_permission.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
63: client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
110:    client := meta.(*AWSClient).opsworksconn

aws/resource_aws_opsworks_rds_db_instance.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
44: client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
73: client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
95: client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
132:    client := meta.(*AWSClient).opsworksconn

aws/resource_aws_opsworks_stack.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
274:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
399:    originalConn := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
422:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
504:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
586:    client := meta.(*AWSClient).opsworksconn

aws/resource_aws_opsworks_user_profile.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
46: client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
80: client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
100:    client := meta.(*AWSClient).opsworksconn
--------------------------------------------------------------------------------
120:    client := meta.(*AWSClient).opsworksconn

aws/resource_aws_pinpoint_app.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
146:    pinpointconn := meta.(*AWSClient).pinpointconn

aws/resource_aws_proxy_protocol_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
38: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
69: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
99: elbconn := meta.(*AWSClient).elbconn
--------------------------------------------------------------------------------
152:    elbconn := meta.(*AWSClient).elbconn

aws/resource_aws_rds_cluster_parameter_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
91: rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
125:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
184:    rdsconn := meta.(*AWSClient).rdsconn
--------------------------------------------------------------------------------
308:    rdsconn := meta.(*AWSClient).rdsconn

aws/resource_aws_route53_delegation_set.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
40: r53 := meta.(*AWSClient).r53conn
--------------------------------------------------------------------------------
66: r53 := meta.(*AWSClient).r53conn
--------------------------------------------------------------------------------
87: r53 := meta.(*AWSClient).r53conn

aws/resource_aws_route53_query_log.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
39: r53 := meta.(*AWSClient).r53conn
--------------------------------------------------------------------------------
59: r53 := meta.(*AWSClient).r53conn
--------------------------------------------------------------------------------
78: r53 := meta.(*AWSClient).r53conn

aws/resource_aws_s3_bucket.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
628:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
703:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
799:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
1336:   s3conn := meta.(*AWSClient).s3conn

aws/resource_aws_s3_bucket_analytics_configuration.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
129:    s3conn := meta.(*AWSClient).s3conn

aws/resource_aws_s3_bucket_notification.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
133:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
339:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
356:    s3conn := meta.(*AWSClient).s3conn

aws/resource_aws_s3_bucket_object.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
185:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
302:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
450:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
477:        kmsconn := meta.(*AWSClient).kmsconn

aws/resource_aws_s3_bucket_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
44: s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
79: s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
101:    s3conn := meta.(*AWSClient).s3conn

aws/resource_aws_s3_bucket_public_access_block.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
61: s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
100:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
156:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
201:    s3conn := meta.(*AWSClient).s3conn

aws/resource_aws_s3_object_copy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
287:    s3conn := meta.(*AWSClient).s3conn
--------------------------------------------------------------------------------
418:    s3conn := meta.(*AWSClient).s3conn

aws/resource_aws_serverlessapplicationrepository_cloudformation_stack.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
91: cfConn := meta.(*AWSClient).cfconn
--------------------------------------------------------------------------------
124:    serverlessConn := meta.(*AWSClient).serverlessapplicationrepositoryconn
--------------------------------------------------------------------------------
125:    cfConn := meta.(*AWSClient).cfconn
--------------------------------------------------------------------------------
209:    cfConn := meta.(*AWSClient).cfconn
--------------------------------------------------------------------------------
276:    cfConn := meta.(*AWSClient).cfconn

aws/resource_aws_sns_platform_application.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
95: snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
125:    snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
205:    snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
276:    snsconn := meta.(*AWSClient).snsconn

aws/resource_aws_sns_sms_preferences.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
95: snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
127:    snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
152:    snsconn := meta.(*AWSClient).snsconn

aws/resource_aws_sns_topic.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
134:    snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
267:    snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
384:    snsconn := meta.(*AWSClient).snsconn
--------------------------------------------------------------------------------
485:    snsconn := meta.(*AWSClient).snsconn

aws/resource_aws_sns_topic_policy.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
67: snsconn := meta.(*AWSClient).snsconn

aws/resource_aws_sqs_queue.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
136:    sqsconn := meta.(*AWSClient).sqsconn
--------------------------------------------------------------------------------
234:    sqsconn := meta.(*AWSClient).sqsconn
--------------------------------------------------------------------------------
279:    sqsconn := meta.(*AWSClient).sqsconn
--------------------------------------------------------------------------------
438:    sqsconn := meta.(*AWSClient).sqsconn

aws/resource_aws_ssm_activation.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
72: ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
140:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
184:    ssmconn := meta.(*AWSClient).ssmconn

aws/resource_aws_ssm_association.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
133:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
205:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
255:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
317:    ssmconn := meta.(*AWSClient).ssmconn

aws/resource_aws_ssm_document.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
247:    ssmconn := meta.(*AWSClient).ssmconn

aws/resource_aws_ssm_maintenance_window.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
88: ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
145:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
202:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
245:    ssmconn := meta.(*AWSClient).ssmconn

aws/resource_aws_ssm_maintenance_window_target.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
95: ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
128:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
178:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
209:    ssmconn := meta.(*AWSClient).ssmconn

aws/resource_aws_ssm_parameter.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
111:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
204:    ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
219:    ssmconn := meta.(*AWSClient).ssmconn

aws/resource_aws_ssm_patch_group.go
severity:warning rule:aws-go-sdk-service-client-variable-naming: Prefer naming AWS Go SDK service client variable as conn in resources
34: ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
51: ssmconn := meta.(*AWSClient).ssmconn
--------------------------------------------------------------------------------
81: ssmconn := meta.(*AWSClient).ssmconn
ran 10 rules on 2135 files: 265 findings
github-actions[bot] commented 1 year ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ā³. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.