Hoi ! I was wondering how you guys iterate over na...
# general
a
Hoi ! I was wondering how you guys iterate over naming conventions in a pulumi stack ? Say you have you have function
genId
prefixing all your ids with the environment. i.e.
prod-<id>
but then later you change your mind and you want to use
<id>-prod
instead and change
genId
i know there are aliases, however, these are not really helpful when you use a function
genId
to generate these ids. For this change you would need to go through all the code and add an
aliases
section, and add the results of the old version of
genId
. Is there a better way ? Right now the quickest solution i found without using aliases is to call
pulumi destroy
. Thankfully i don’t care about uptime at the moment.
f
I think you should be able to define a transformation to add an alias property to all those resources: https://www.pulumi.com/docs/intro/concepts/programming-model/#transformations