Terraform-provider-aws: aws_lb does not support all loadbalancer attributes

Created on 24 Feb 2018  ·  7Comments  ·  Source: hashicorp/terraform-provider-aws

The aws_lb resource support access logs and deletion protection, but there are a few other attributes that are not exposed via this provider [0][1]. This resource exposes the two available attributes as top-level arguments, while, for example, CloudFormation asks for a list of attributes [2], which I think is more flexible, although maybe this resource tries to keep things similar to aws_elb.

I need to enable cross-zone load balancing and adjust the timeout, but this must currently be done out-of-band.

Affected Resource(s)

  • aws_lb

References

0: https://www.terraform.io/docs/providers/aws/r/lb.html
1:
https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_LoadBalancerAttribute.html
2: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-elasticloadbalancingv2-loadbalancer.html#cfn-elasticloadbalancingv2-loadbalancer-loadbalancerattributes

enhancement servicelbv2

Most helpful comment

Support for NLB cross-zone load balancing has been merged into master and will release with v1.11.0 of the AWS provider, likely in a week. It looks like @appilon and @mpilar will be working out HTTP/2 in a followup PR. 😄

All 7 comments

Support for NLB cross-zone load balancing has been merged into master and will release with v1.11.0 of the AWS provider, likely in a week. It looks like @appilon and @mpilar will be working out HTTP/2 in a followup PR. 😄

Thanks for the hard work, everyone!

Hello,

In our tests:

  • Creating an ALB with enable_http2 set to false does not work: it creates an ALB with the flag set to true. The state contains "enable_http2": "false".
  • Modifying the value in the terraform code trigger the change up to AWS
  • Modifying the value in AWS has no consequence: terraform does not attempt to fix that.
Terraform v0.11.2
+ provider.aws v1.11.0

We seem to be having exactly the same issue as @octplane is having. Should this ticket be re-opened or a new one created?

I've traced through the code and think I've found the issue, I should have a PR with a fix up soon

The bug appears to be a bit more elusive than I thought. Working on a fix. I have made a new issue to track progress.
https://github.com/terraform-providers/terraform-provider-aws/issues/3848

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!

Was this page helpful?
0 / 5 - 0 ratings