-
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
[aws_lb_target_group] Validation forces invalid path for TCP health check #2978
Comments
… checks Fixes hashicorp#2978 "Validation forces invalid path for TCP health check" Currently the validation forces the health check path to begin with a slash("/"), even when the protocol is TCP, in which case the health check path must be blank. The validation is preventing valid use cases. Since this validation can only check the one field on its own, the check is amended to only validate the path begins with a "/" if the path is not blank. Note that when the path is blank, it is not passed to AWS at all (see lines 226-228), so I think this change does not weaken validation.
Looks like there is a fairly trivial fix for this: PR #2980 Only check for "/" if the path is not blank. |
This fix is in master and will be released in v1.7.1, which we are planning for later this week. |
This has been released in terraform-provider-aws version 1.7.1. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
… checks Fixes hashicorp#2978 "Validation forces invalid path for TCP health check" Currently the validation forces the health check path to begin with a slash("/"), even when the protocol is TCP, in which case the health check path must be blank. The validation is preventing valid use cases. Since this validation can only check the one field on its own, the check is amended to only validate the path begins with a "/" if the path is not blank. Note that when the path is blank, it is not passed to AWS at all (see lines 226-228), so I think this change does not weaken validation.
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! |
It is desirable to be able to configure either a TCP or HTTP/HTTPS health check based on variables as in the below example. Currently the validation forces the health check path to begin with a slash("/"), even when the protocol is TCP, preventing this use case. When the protocol is TCP, blank ("") is the only valid path for the AWS API.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Expected to be able to use a blank 'path' for a TCP health check.
Or else the path validation should be left to the AWS API.
Actual Behavior
Steps to Reproduce
aws_lb_target_group
withhealth_check.protocol="TCP"
andhealth_check.path=""
terraform init
terraform apply
References
Validation was recently improved to enable HTTP/HTTPS health checks to be able to be specified for TCP Target Groups in PR #2906.
The text was updated successfully, but these errors were encountered: