-
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
Dont recreate listener rule after priority change #23768
Dont recreate listener rule after priority change #23768
Conversation
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.
Welcome @m-eitan 👋
It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTING guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.
Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.
Thanks again, and welcome to the community! 😃
Can you please run the acceptance tests and add them to the body of the PR description. |
Updated 👍 |
Any update regarding this PR? @bschaatsbergen @justinretzolk |
Hey @m-eitan 👋 Thank you for checking in on this, and for your contribution! Unfortunately, I'm not able to provide an estimate on when this will be merged due to the potential of shifting priorities (we prioritize work by count of ":+1:" reactions, as well as a few other things). A larger prioritization document is in the works, but in the meantime additional information may be found in the FAQ. |
@justinretzolk Understood, thank you |
@justinretzolk I would really appreciate if you can take a look again, there are already 6 upvotes and it's a really small change but very important for us to be able to re-order listener rules without downtime using the provider |
Hi @m-eitan, I can take a look at this PR in the coming 2 days. I'll need some time to dive into it locally and see why it currently is being forced to recreate. Meanwhile, thanks for your contribution 👍 |
Seems perfectly possible 👍 Terraform will perform the following actions:
# aws_lb_listener_rule.non_static will be updated in-place
~ resource "aws_lb_listener_rule" "non_static" {
id = "arn:aws:elasticloadbalancing:eu-central-1:822224938642:listener-rule/app/test-lb-tf/420e0d31f1b15ac1/7feed816395e01ae/63bdb0bc028425c1"
~ priority = 104 -> 101
tags = {}
# (3 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
# aws_lb_listener_rule.static will be updated in-place
~ resource "aws_lb_listener_rule" "static" {
id = "arn:aws:elasticloadbalancing:eu-central-1:822224938642:listener-rule/app/test-lb-tf/420e0d31f1b15ac1/7feed816395e01ae/4b79897a3bafe9f0"
~ priority = 110 -> 100
tags = {}
# (3 unchanged attributes hidden)
# (3 unchanged blocks hidden)
}
Plan: 0 to add, 2 to change, 0 to destroy.
aws_lb_listener_rule.non_static: Modifying... [id=arn:aws:elasticloadbalancing:eu-central-1:822224938642:listener-rule/app/test-lb-tf/420e0d31f1b15ac1/7feed816395e01ae/63bdb0bc028425c1]
aws_lb_listener_rule.static: Modifying... [id=arn:aws:elasticloadbalancing:eu-central-1:822224938642:listener-rule/app/test-lb-tf/420e0d31f1b15ac1/7feed816395e01ae/4b79897a3bafe9f0]
aws_lb_listener_rule.non_static: Modifications complete after 1s [id=arn:aws:elasticloadbalancing:eu-central-1:822224938642:listener-rule/app/test-lb-tf/420e0d31f1b15ac1/7feed816395e01ae/63bdb0bc028425c1]
aws_lb_listener_rule.static: Modifications complete after 1s [id=arn:aws:elasticloadbalancing:eu-central-1:822224938642:listener-rule/app/test-lb-tf/420e0d31f1b15ac1/7feed816395e01ae/4b79897a3bafe9f0]
Apply complete! Resources: 0 added, 2 changed, 0 destroyed. |
1 comment before we can get this approved and merged:
Once ☝️ is done I'll ask one of the internal folks to sign of the PR. Test ( ==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elbv2/... -v -count 1 -parallel 20 -run='TestAccELBV2ListenerRule_updateRulePriority' -timeout 180m
=== RUN TestAccELBV2ListenerRule_updateRulePriority
=== PAUSE TestAccELBV2ListenerRule_updateRulePriority
=== CONT TestAccELBV2ListenerRule_updateRulePriority
--- PASS: TestAccELBV2ListenerRule_updateRulePriority (278.91s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/elbv2 278.944s |
@bschaatsbergen Thanks a lot for your response :) |
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 🚀
@ewbankkit, could you check this out please :)
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=TestAccELBV2ListenerRule_updateRulePriority\|TestAccELBV2ListenerRule_basic\|TestAccELBV2ListenerRule_changeListenerRuleARNForcesNew' PKG=elbv2 ACCTEST_PARALLELISM=2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/elbv2/... -v -count 1 -parallel 2 -run=TestAccELBV2ListenerRule_updateRulePriority\|TestAccELBV2ListenerRule_basic\|TestAccELBV2ListenerRule_changeListenerRuleARNForcesNew -timeout 180m
=== RUN TestAccELBV2ListenerRule_basic
=== PAUSE TestAccELBV2ListenerRule_basic
=== RUN TestAccELBV2ListenerRule_updateRulePriority
=== PAUSE TestAccELBV2ListenerRule_updateRulePriority
=== RUN TestAccELBV2ListenerRule_changeListenerRuleARNForcesNew
=== PAUSE TestAccELBV2ListenerRule_changeListenerRuleARNForcesNew
=== CONT TestAccELBV2ListenerRule_basic
=== CONT TestAccELBV2ListenerRule_changeListenerRuleARNForcesNew
--- PASS: TestAccELBV2ListenerRule_basic (240.54s)
=== CONT TestAccELBV2ListenerRule_updateRulePriority
--- PASS: TestAccELBV2ListenerRule_changeListenerRuleARNForcesNew (252.01s)
--- PASS: TestAccELBV2ListenerRule_updateRulePriority (266.27s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/elbv2 510.582s
@m-eitan Thanks for the contribution 🎉 👏. |
Nice, thanks for the contribution 🎉 @m-eitan |
Awesome thanks a lot for all your work :) @bschaatsbergen @ewbankkit |
This functionality has been released in v4.14.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. |
Dont recreate listener rule after priority change
It is possible to update the priority without recreating the rule, which is preferred of course. See docs.
Release Notes:
Acceptance Tests: