-
-
Notifications
You must be signed in to change notification settings - Fork 124
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: redirect default action for https listener #187
feat: redirect default action for https listener #187
Conversation
/terratest |
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.
@oycyc looks good, I added a couple of suggestions.
Also, could you please fix the test following this example cloudposse/terraform-aws-ecs-alb-service-task#252?
Thanks in advance 🙌
/terratest |
/terratest |
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.
Thanks, @oycyc 👍
These changes were released in v1.11.2. |
Awesome, thanks! |
JFYI, it seems the readme was not updated after the latest commit that added the defaults: -| <a name="input_listener_https_redirect"></a> [listener\_https\_redirect](#input\_listener\_https\_redirect) | Have the HTTPS listener return a redirect response for the default action. | <pre>object({<br/> host = optional(string)<br/> path = optional(string)<br/> port = optional(string)<br/> protocol = optional(string)<br/> query = optional(string)<br/> status_code = optional(string)<br/> })</pre> | `null` | no |
+| <a name="input_listener_https_redirect"></a> [listener\_https\_redirect](#input\_listener\_https\_redirect) | Have the HTTPS listener return a redirect response for the default action. | <pre>object({<br/> host = optional(string)<br/> path = optional(string)<br/> port = optional(string)<br/> protocol = optional(string)<br/> query = optional(string)<br/> status_code = string<br/> })</pre> | <pre>{<br/> "host": null,<br/> "path": null,<br/> "port": null,<br/> "protocol": null,<br/> "query": null,<br/> "status_code": "HTTP_301"<br/>}</pre> | no | IIRC there was a CI check for this in the past, was it removed? |
Thanks! Somehow got missed. I'm creating a new PR just to update the README. #188 |
Looks like #184 can be closed now, thank you for implementing this! |
Ah didn't see this issue. Thanks for linking this! |
It seems this adds a redirect by default, as the Lines 231 to 232 in cb8fa65
terraform-aws-alb/variables.tf Lines 292 to 311 in cb8fa65
Plan:
Explicitly passing |
@mschfh thanks for bringing this up, this would be quite an issue since it'll affect the default. Made a PR for this: #190 Really appreciate you putting this here!! |
what
Adds the ability for a HTTPS listener to have an default action of "redirect" in addition to the current two existing "fixed-response" and "target group".
Create a new variable to support this with default of null.
Ran
make readme
why
There are use cases when the default action to be
redirect
that we want for an ALB listener if it doesn't match any rules to redirect. See image below for the action in AWS console.This would be good to have in the module, otherwise when there is a case that this needs to be configured, this specific resource has to be stripped out.