Hi. How do you automatically name resources based ...
# general
r
Hi. How do you automatically name resources based on cloud resource type in Pulumi ?
e
Every resource you declare in you Pulumi program needs to be given a unique logical name (it's the first parameter of the resource constructor), this can't really be done automatically. But maybe I've misunderstood what your trying to achieve here?
r
I have the following code to create the naming for the resource based on the project name and stack name, which works, but I would like to improve it, so it is as automated as possible.
e
I'm not sure there's much more you could do currently. But this looks like it could be related to https://github.com/pulumi/pulumi/issues/1518 so I'd suggest making a comment there with what your trying to do.
r
@echoing-dinner-19531 Thanks I will try that
g
@red-scooter-62880, i just tried something using
pulumi.Output.all
, check out the example i posted in the slack there just below this thread. Could be useful 🤷
r
@gentle-account-13294 Hmm that might be usefull, I will check that out