-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
elbv2: Prevent panics from unsafe * nil dereferences #5367
Conversation
…des priority Fixes: aws/resource_aws_lb_listener_rule.go:190: missing argument for Errorf("%s"): format reads arg 2, have only 1 args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
@tombuildsstuff is faster than lightning! |
This has been released in version 1.30.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
It was added in 10532ba (Be explicit about protocol options for target group, 2018-07-19, hashicorp#5246), which quotes an error message that includes "TLS". But neither the AWS docs [1,2] nor our internal validation (e.g. see d2e38fd, elbv2: Prevent panics from unsafe dereferences, 2018-07-27, hashicorp#5367) include a TLS protocol. [1]: https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_CreateTargetGroup.html#API_CreateTargetGroup_RequestParameters [2]: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/target-group-health-checks.html#health-check-settings
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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Sorry for the cross-resource pull request but it seemed better to fix this across all the ELBv2 resources instead of just the specific case.
Fixes #5357
Changes proposed in this pull request:
*
nil dereference panics by using SDK provided functions (e.g.aws.StringValue()
)errwrap.Wrapf()
usage withfmt.Errorf()
isAWSErr()
instead of customisInvalidTarget()
/isTargetGroupNotFound()
functionsvalidateLbListenerActionType()
usage in preparation for Add support for 'redirect' and 'fixed-response' into lb_listener_rule action type #5344validateLbListenerProtocol()
usage in preparation for potential ELBv2 resource splitOutput from acceptance testing: