This message was deleted.
# dotnet
s
This message was deleted.
l
I'm just about the furthest thing from a Pulumi expert. I started out trying to not use the random suffixes. In the end, I think it's best to let Pulumi generate those random suffixes where it needs to. I use "tags" (Azure) to add information to the various resources, e.g.
Copy code
Tags =
{
    { "environment", "Development" },
},
e
There's some docs on this at https://www.pulumi.com/docs/intro/concepts/resources/names/ The two names are different names, we call them the logical and physical names. Our default behaviour is to use the logical name plus a random suffix for the physical name as that seems to work well for the majority of use cases. We do have an issue (https://github.com/pulumi/pulumi/issues/1518) to track providing a way to globally configure that.
b
Hmmm, I see... In many projects I work with Terraform, they create the resources with suffixes or at least a part of the name that explains what environment it belongs to, in order to more easily visualize that at a glance when looking at the resources list of a subscription...
Is there a better way to do this?
Or they're just different ways?
e
Just different, once we work out a good way of doing 1518 that'll probably support a load of different ways in a first class sort of manner, but for now the random suffixes work for most cases and you can override the physical names of resources as well if you want, although it is a bit more code to setup.
i
I don’t like the randomness … I do this on every resource:
ResourceGroupName = $"rg-{p.projectName}-{p.env}"
💯 1
b
Yeah, I have to agree that I don't like it either and that, like many pointed out in #1518, many places use to establish conventions for how the resources are going to be named. It's not the same looking at a notification about a resource having an issue and its name being a random one, than looking and knowing at first glance that it's an app service, for a given service/project, from a given environment...
b
I use Harmony to make a hook/callback so I can set the names using different naming strategies. Until 1518 is hashed out. I also use to not lie the randomness but now almost require it if the resource is at a level it could collide with other resources. It also forces me to lay the infra out in a way where several can be stood up side by side.