Hi! How to get resource auto-name from URN? Is tha...
# typescript
s
Hi! How to get resource auto-name from URN? Is that possible.
f
Can you elaborate a bit on what you're trying to do? I'm not quite understanding what you're looking for.
👍 1
☝️ 1
s
sure, I exported the URN of
aws:lb:ApplicationLoadBalancer
from one project-1. From project-2, used
StackReference
to re-use the existing resource (created via project-1) to add metrics using
aws.cloudwatch.MetricAlarm
f
Are you referring to a Pulumi URN, or an AWS ARN?
Pulumi URNs won't be useful to you if you're trying to create additional AWS resources that depend on AWS resources from another stack (or even within a stack, for that matter).
👍 1
But in general, using stack references to create additional resources like this is a standard pattern in Pulumi.
s
thanks @full-artist-27215 for the details. Yes, I'm using Pulumi URN, will change it then.
👍 1
f
@straight-caravan-63576 Good luck! Feel free to share some code if you'd like some feedback on your approach.
👍 1