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

[Epic] More control over auto-naming #16188

Open
4 tasks
justinvp opened this issue May 13, 2024 · 2 comments
Open
4 tasks

[Epic] More control over auto-naming #16188

justinvp opened this issue May 13, 2024 · 2 comments
Assignees
Labels
kind/epic Large new features or investments

Comments

@justinvp
Copy link
Member

Lots of things in Pulumi use autonaming – a feature whereby Pulumi ensures unique names for “physical” (cloud-side) resources by generating names or name suffixes. For instance, if one uses the AWS provider to write:

const foo = new aws.rds.Instance("foo", { ... })

One will end up with an RDS database named (for instance) foo-ab158dc9. The motivations for this feature are several – being able to handle create-before-replace semantics to aid in various zero-downtime scenarios; being able to spin up multiple instances of the same stack into a single account/cloud-side presence; and so on.

If one wants to specify a resource name exactly, this can nearly always be accomplished by explicitly specifying a specific input (rather than relying on the Pulumi resource name). Often this is called name, but this is not always the case; for RDS instances the input is named identifier:

const foo = new aws.rds.Instance("foo", { identifier: "foo", ... })

RDS instances also happen to offer an identifierPrefix input which allows some degree of control over names whilst still asking Pulumi to generate parts of the name, but this is specific to this resource. In general, to control naming, users and customers will have to think about this issue for each provider and set of resources they create.

This is not ideal, and many users and customers have wanted broad-spectrum or high-level control over how and when autonaming works for a long time.

Related issues: #1518

Design (M104)

Implementation Plan

TODO

Announce

  • Documentation updates for this new capability
  • Write blog post announcing
  • 🍦
@justinvp justinvp added the kind/epic Large new features or investments label May 13, 2024
@MarkTallentire
Copy link

Personally i just dont think autonaming works at all. DeleteBeforeReplace should just become the standard behaviour and autonaming scrapped in favour of the name being passed to the constructor being the name used.

@Frassle
Copy link
Member

Frassle commented May 20, 2024

The intention is to make that an option, but we have plenty of customers who believe the opposite and we can't safely make a break change like that now anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/epic Large new features or investments
Projects
None yet
Development

No branches or pull requests

4 participants