Skip to content
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

[elasticloadbalancingv2] add addAction() to IApplicationListener and imported application listeners. #10902

Closed
2 tasks
misterjoshua opened this issue Oct 15, 2020 · 5 comments · Fixed by #19293
Closed
2 tasks
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1

Comments

@misterjoshua
Copy link
Contributor

misterjoshua commented Oct 15, 2020

I'd like for the IApplicationListener interface and imported listeners to include addAction() the same as ApplicationListener.

Use Case

I'd like to add a redirect listener rule to an imported ALB listener.

Proposed Solution

Why can't we add this method to the IApplicationListener interface and then add the missing implementation to ImportedApplicationListener?

Other

I can work around this issue by manually creating ApplicationListenerRules and an ApplicationTargetGroup, but this approach is not as convenient as listener.addTarget('name', {...}).

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

@misterjoshua misterjoshua added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 15, 2020
@github-actions github-actions bot added the @aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 label Oct 15, 2020
@misterjoshua misterjoshua changed the title [elasticloadbalancingv2] add addAction() to IApplicationListener and imported application listeners. [elasticloadbalancingv2] add addAction() to IApplicationListener and imported application listeners. Oct 15, 2020
@njlynch njlynch added effort/medium Medium work item – several days of effort p1 and removed needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2020
@marklabenski
Copy link

@misterjoshua I really like to see this feature happening too.
Can you explain your solution in a little more detail please? I have the problem with adding a Cognito action before forwarding on existing listeners :/

@misterjoshua
Copy link
Contributor Author

@misterjoshua I really like to see this feature happening too.
Can you explain your solution in a little more detail please? I have the problem with adding a Cognito action before forwarding on existing listeners :/

Do you mean the part about modifying the CDK project, or do you mean my workaround?

@gburke-ppb
Copy link

I too am looking for this.

We have an ALB that we use for multiple applications.
For the most part using elbv2.ApplicationListener.fromApplicationListenerAttributes() to return an IApplicationListener and calling addTargetGroups() on this works -- this is fine for just adding a host header and a forward to a TargetGroup. (although adding the priority is a bit of a headache... but that's not for this issue).

However we are trying to add authentication with Cognito before forwarding to the TargetGroup, and this would be done using addAction() -- this isn't available on the returned object!

So using an existing ALB, how can we add this action?

Also the documentation for ApplicationListener itself mentions using addAction() over the other methods.

So can you please expose addAction() through the IApplicationListener interface? The only Class implementing this interface is ApplicationListener itself, so it should be an easy thing to add, I would hope.

We are currently blocked on a piece of work because of this. 😢

@gburke-ppb
Copy link

@njlynch I see you closed the new issue, but nobody is assigned to this one and nothing has been done since it was opened 16 months ago. Is this issue still to be fixed? Is there an ETA?
Thanks.

@mergify mergify bot closed this as completed in #19293 Mar 31, 2022
mergify bot pushed a commit that referenced this issue Mar 31, 2022
…19293)

This PR adds the ability to call `addAction()` on an imported
`IApplicationListener`.

Fixes #10902


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

StevePotter pushed a commit to StevePotter/aws-cdk that referenced this issue Apr 27, 2022
…ws#19293)

This PR adds the ability to call `addAction()` on an imported
`IApplicationListener`.

Fixes aws#10902


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-elasticloadbalancingv2 Related to Amazon Elastic Load Balancing V2 effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants