-
-
Notifications
You must be signed in to change notification settings - Fork 677
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
feat: Added listener rules support #155
feat: Added listener rules support #155
Conversation
Hi @dmattia ! At first look, it looks very good to me, but I don't have a lot of time to review it and verify examples. @rriveramdz could you please take a look at this? In particular, I wonder if there are any differences in code between this PR and your recent PR where you added actions. Thanks guys! |
Hi @dmattia. This looks really great. I guess the only thing I think should be added is to add in README and examples that there's a maximum of two actions per load balancer rule, so that users have this clear. |
0c71c70
to
a71fb49
Compare
Awesome, thanks for the quick reviews both of you! I updated the README to include a warning about how to use the |
Just updated the branch. Please let me know if there's anything else I can do |
@dmattia Thanks for this, looks awesome. Tried running the code, I'm getting the below error, Am I doing something wrong?
|
@limratechnologies what does your condition look like? In particular, your |
@dmattia I have used the format mentioned in the example.
|
635fbcf
to
c6a61fc
Compare
Sure, I just updated a fix to the issue @limratechnologies had, and now the complete example works. It's ready for review now |
Thanks, @dmattia and @rriveramdz ! v5.9.0 has been just released. |
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. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Added listener rules support.
This PR adds support for creating
aws_lb_listener_rule
resources, with all currently supported actions and conditions from the terraform provider supported. For now, I only added support to https listeners, but adding http listener support later would be trivial.Docs wise, I updated the REAMDE to include an example of using the listener_rule var, and also updated the example to have near-complete usage.
Motivation and Context
This repo recently added support for updating the default rule for a listener, which was awesome. This PR goes one step further, for adding rules with conditions, such as only protecting certain paths with authentication.
Fixes: #154
Breaking Changes
There are no breaking changes. Plans will be empty on upgrades to use this branch's code if users do not make any changes.
How Has This Been Tested?
I have tested some of the actions/conditions in the
dev
environment in my companies codebase. I also updated the complete alb example to use almost every actions/condition type and ensured thatterraform validate
came up clean.