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.7k stars 9.07k forks source link

Replace or remove calls to `fmt.Print` (and variants) #18489

Closed ewbankkit closed 3 years ago

ewbankkit commented 3 years ago

Community Note

Description

Random calls to fmt.Printf (and similar) in the code should be replaced with log.Printf or removed:

% find aws/ -name '*.go' -print | xargs grep 'fmt\.Print'
aws//internal/vault/sdk/helper/jsonutil/json_test.go:       fmt.Printf("decoding err: %v\n", err)
aws//resource_aws_api_gateway_rest_api.go:      fmt.Printf("error normalizing policy JSON: %s\n", err)
aws//resource_aws_lakeformation_permissions_test.go:            fmt.Print(out)
aws//resource_aws_lb_ssl_negotiation_policy_test.go:            fmt.Printf("[ERROR] Problem describing load balancer policy '%s': %s", policyName, err)
aws//resource_aws_cloudwatch_event_target_test.go:      fmt.Printf("%#v", rs.Primary.Attributes)
aws//resource_aws_sns_topic_subscription_test.go:       fmt.Println(err)

Consider adding a linter rule to prevent these in future.

ewbankkit commented 3 years ago

resource_aws_cloudwatch_event_target_test.go addressed in #18491.

ghost commented 3 years ago

This has been released in version 3.38.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

github-actions[bot] commented 3 years 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.