pulumi / pulumi-cloud

A highly productive multi-cloud framework for containers, serverless, and data
Apache License 2.0
133 stars 19 forks source link

Ability to set cloud endpoint name #504

Closed mikhailshilkov closed 3 months ago

mikhailshilkov commented 6 years ago

Looking at e.g. hello-aws-javascript template, endpoint.get syntax is nice but it doesn't seem to expose a property to set explicit name for created Lambda. So, the name will always have a random suffix - similar to hello66382ec5.

I would like to be able to set the name, e.g.

endpoint.get(
    { path: "/source", name: "hellofunc" }, 
    (req, res) => res.json({name: "AWS"})
);

(The exact API is up to you to figure out.)

While I understand that you try to keep things as simple as possible, I don't feel very good about having many meaningless names in Cloud account.

My company has explicit policy of naming cloud resources. It also includes properties like description, tags etc. Not being able to follow it could be a showstopper. We are in Azure, but that shouldn't matter much.

lukehoban commented 5 years ago

This is important, but will require a large set of changes to all components in the cloud package. Since we have several other things we will likely do as part of a large cross cutting change like this, we'll hold off on this until we can do a redesign of the API surface that takes this into consideration.

chicagobuss commented 1 year ago

uh, 5 years and nothing on this? Is there any way to set my GCP resource names explicitly? This is extremely important in a few specific areas like database names when you're managing hundreds of databases - you don't want each instance to have a different unique database name.

lukehoban commented 1 year ago

@chicagobuss This issue is about the @pulumi/pulumi-cloud package, which is a preview package for multi-cloud container/serverless applications built on top of Pulumi. It sounds like you are referring to a different issue/need related to the pulumi-gcp library? You can in general explicitly name your resources by passing the name property to them (though the name of that property may depend on the resource in some cases). If you cannot identify the right property to use to explicitly name your resource, you can open an issue in that repo or ask in the Pulumi Community Slack.