-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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: Handle case where no updated attributes are supported #35228
aws_lb: Handle case where no updated attributes are supported #35228
Conversation
Community NoteVoting for Prioritization
For Submitters
|
0cd18b9
to
44850f0
Compare
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 🚀.
% make testacc TESTARGS='-run=TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone' PKG=elbv2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elbv2/... -v -count 1 -parallel 20 -run=TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone -timeout 360m
=== RUN TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone
=== PAUSE TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone
=== CONT TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone
--- PASS: TestAccELBV2LoadBalancer_NetworkLoadBalancer_updateCrossZone (313.46s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/elbv2 319.192s
@Jdsleppy Thanks for the contribution 🎉 👏. |
This functionality has been released in v5.32.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. Thank you! |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
When an update to an LB is desired the provider repeatedly calls
ModifyLoadBalancerAttributesWithContext()
, removing attributes-to-update as needed when the appropriate error is returned, e.g.InvalidConfigurationRequest: Load balancer attribute key 'dns_record.client_routing_policy' is not supported on load balancers with type 'network'
will cause a retry without thedns_record.client_routing_policy
attribute.When there is only one attribute to update and it is not supported in this partition, we hit a case where we'll retry the
Modify...
call with an empty attribute list. This is the case in the related issue.The fix is to no-op if the attributes list is pruned to the empty slice.
ℹ️ I'm not sure how to write a new acceptance test for this one because the only way to hit this edge case that I know of (I know very little about the AWS provider to be fair) is to upgrade the provider from version
5.22
to5.31
, which isn't that easy to test.Relations
Closes #35014
References
Output from Acceptance Testing
Manual testing
Before the fix, I was able to reproduce the error using a local
make build
of the provider and the minimal reproducing TF configuration from #35014.After the fix, I am able to upgrade from provider version
5.22
to my build frommain
branch and do the following: