I'm wanting to generate a docker container style n...
# general
I'm wanting to generate a docker container style name like "sad_panda" or "amazing_aardvark", use that to name a resource, and store it in state. I've used
to generate things and store them in state. However, I don't see any sort of generic construct to do this. Does this need to be a custom provider?
For which resources? Most resources have a
parameter that does what you want.
My experience in the past is that if I were to pull in some other name generator, it would attempt to generate a random value for the
and attempt a rename of the resource.
Essentially, I'm looking for something to run the name generation the first time, then just retrieve from state all subsequent calls, similar to the pulumi random
Hopefully, I'm not thinking about this incorrectly
@few-carpenter-12885 this is what
does: https://www.pulumi.com/registry/packages/random/api-docs/randompet/
Ah, I did see that package, makes sense. What is the preferred way to duplicate then modify this functionality? Create a class that
extends pulumi.CustomResource
Are you trying to set the resource name via this? That's not really supported right now, the name is what tells us what to look up in state, you can't build the name based on something in state because until you have the name you can't look up anything in state...