-
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 with aws_lb (unable to disable stickiness not supported in NLB) #10494
Comments
Okay, I managed to get past this. Using:
to
I will leave the issue open as I feel there might be an issue with terraform managing the resources. Feel free to close it if you think it's appropriate. Thank you |
throws Error modifying Target Group Attributes: InvalidConfigurationRequest: The provided target group attribute is not supported otherwise hashicorp/terraform-provider-aws#10494
For what it's worth, we had been adding
to the target group for our network load balancer to work around #2746. I tested this with Terraform 0.12.9 and 0.12.18 using AWS provider version 2.43 |
In Terraform 0.12.20 this does not appear to work and the resource seems to be unusable for NLB's. |
I was not able to use the solution of setting stickiness to a disabled block or to an empty array. Also upgrading to the latest AWS provider didn't help either. |
As mentioned above, the workaround of setting stickiness to an empty array or a disabled block does no longer work. Old workflows where the NLB was already created still work fine, but new deployments break because of this. |
Running v2.58.0 now and I'm able to create target group with stickiness disabled by not providing |
This seems like a duplicate of #9093 |
I'm closing this issue since this problem is fixed with #15295 in v3.10.0. |
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! |
Community Note
Terraform Version
Terraform v0.12.10 provider.aws v2.32.0
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
Setting stickiness block with "enabled" set to "false" should not send the stickiness attributes to AWS API if the set protocol is TCP or TLS (or another protocol that do not support stickiness).
The target groups should be created without stickiness attribute, and network load balancer should then be created.
Actual Behavior
Please see below.
Steps to Reproduce
produces below error:
If I define block stickiness as such:
I get:
I have contacted AWS support and they verified that AWS API is receiving the following:
TCP/TLS target groups cannot have "stickiness" attribute hence the error.
Finally, if I don't include stickiness argument or block, I get:
Which looks like stickiness is enabled by default by Terraform.
References
Closed ticket from 2017/2018 with suggested workarounds, which don't work in my case:
The text was updated successfully, but these errors were encountered: