hi is anyone familiar with how to get the `listene...
# aws
f
hi is anyone familiar with how to get the
listenerArn
of the default listener in
awsx.lb.ApplicationLoadBalancer
? I created a
aws.lb.ApplicationLoadBalancer
, in which i have a default action for my listener in port 80, I am then trying to add a listener rule to this same listener but require the listenerArn for this to work
l
It's
lb.loadBalancer.arn
Where
lb
is the awsx.lb.ApplicationLoadBalancer instnce.
f
the arn of the loadBalancer is the same as the arn of the listener?
l
Ah I may have misread. One moment please.
It looks like it might be
lb.listeners[0].arn
.
f
lb.listeners
returns a
Output<Listener[] | undefined>
so idt u can do that
l
That's a type issue 🙂 Try something along the lines of
lb.listeners.apply((ls) => ls[0]?).arn
. Or something.
f
ah that seems so hacky hahaha
l
awsx* is hacky. It's for getting started quickly. If you want to do anything non-standard or even slightly non-convention-over-configuration, then you should consider using aws instead.
f
thanks!