Best-practices-wise, should resources have unique ...
# general
s
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
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
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