https://pulumi.com logo
#aws
Title
# aws
s

steep-cartoon-89174

01/30/2022, 1:16 PM
Hey, I'm confused about how to get existing resources for the awsx namespace : if I want to create a targetgroup for and alb for example, I'd get the alb with
aws.alb.getLoadBalancer()
but then
new awsx.lb.ApplicationTargetGroup
requires an
awsx.lb.ApplicationLoadBalancer
How do I get the existing one? Do I need to do a new`awsx.lb.ApplicationLoadBalancer` with the existing name ? feels strange
l

little-cartoon-10569

01/30/2022, 6:46 PM
I think don't awsx.lb has an equivalent to Vpc's fromExistingIds. You probably want to stick with the aws package's classes for this case.
In general, if you're comfortable with the way Pulumi works, there isn't a great reason to use the awsx packages. In my experience, it's pretty easy to create equivalent ComponentResources with additional domain-specific logic that suit your environment better, and you can expose the exact properties you need for logging, inter-op, etc.
They're great places to start, but you sacrifice just enough configurability to make it awkward to use once you get into interesting use cases
m

millions-furniture-75402

02/28/2022, 7:29 PM
seconding the pain you get yourself into using awsx over aws package more than not.
7 Views