Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Auto prefix names with some stack configuration value #1771

Open
chrsmith opened this issue Aug 14, 2018 · 4 comments
Open

Suggestion: Auto prefix names with some stack configuration value #1771

chrsmith opened this issue Aug 14, 2018 · 4 comments
Labels
area/engine Pulumi engine impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features

Comments

@chrsmith
Copy link
Contributor

Reported on the Community Slack:

Something that would be nice is a stack-wide “name prefix” that gets applied to automatically generated names (e.g. for things like prod- or whatever)

This seems like a common pattern in practice, e.g. having several stacks with the same name but differentiated via suffix. e.g. "website-staging", "website-prod", etc.

One reason for resisting this type of thing in the past, was that anything that goes into the resource's name becomes part of its identity. And so if that "name prefix" were ever to change, then the resource would be considered different.

But between having a richer notion of resource identity (e.g. using a UUID instead of URN) and using a Stack's tags (e.g. the project field in Pulumi.yaml), we should be able to come up with something that makes sense in this area.

@ellismg
Copy link
Contributor

ellismg commented Aug 14, 2018

But between having a richer notion of resource identity (e.g. using a UUID instead of URN) and using a Stack's tags (e.g. the project field in Pulumi.yaml), we should be able to come up with something that makes sense in this area.

Is the request about Pulumi's name for the resource (e.g. what is encoded in the URN) or is it about the name of the actual cloud resource created by the provider?

When the prefix changes, what is the expected behavior? Your comment makes it sound like you would not expect the resources to change, but if this name is to apply to the underlying resource managed by the provider, I think we would be forced to schedule a replacement, even if we somehow made the URNs stable?

@joeduffy
Copy link
Member

We should consider this idea alongside #1518.

@joeduffy joeduffy added this to the 0.20 milestone Oct 30, 2018
@lukehoban lukehoban modified the milestones: 0.20, 0.21 Dec 7, 2018
@lukehoban lukehoban modified the milestones: 0.21, 0.22 Feb 1, 2019
@lukehoban lukehoban modified the milestones: 0.22, 0.23 Mar 17, 2019
@lukehoban lukehoban removed this from the 0.23 milestone May 3, 2019
@spion-h4
Copy link

Another 👍 from me. Including the stack name would be immensely helpful for debugging, especially on the AWS side.

@leezen leezen added impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features labels May 11, 2020
@barakcoh
Copy link

+1

any chance this would find its way into the roadmap? adding these prefixes today is just necessary friction and helper functions that only enforce the prefixing conention

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/engine Pulumi engine impact/usability Something that impacts users' ability to use the product easily and intuitively kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

8 participants