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

straight-cat-87033

06/08/2023, 4:59 PM
Best-practices-wise, should resources have unique names even if they are of different types? I have run into some cases (such as a secret/secret version) where I am consistently repeating the type of the resource in the name. It seems that it doesn’t break functionality to have repeated logical names as long as the whole urn (including type) is different, so perhaps that isn’t necessary)
m

miniature-musician-31262

06/08/2023, 6:00 PM
Great question! I'll share my thoughts but would love to learn from others' experiences on this also. I actually only learned recently that resource names could be reused (as you note, across different types), so I tried it -- and honestly, while it made my CLI output look a lot tidier, it also confused me (when scanning CLI output, resource lists in the Cloud UI, the code itself, etc.) to have multiple different things using the same name. So in general, I've gone back to naming everything uniquely even across different resource types. Personal preference of course, but when my own code confuses me, I know I'm on the wrong path. 🙂
s

straight-cat-87033

06/09/2023, 3:44 PM
Appreciate the input! Wondering about the same cleanliness/completeness tradeoff myself. I’m not sure how often (if ever) I’m referring to the name in isolation — nice to hear others experience in this same venture