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
Random characters at end of resource name #209
Comments
Hi @tmeckel, you should be able to specify the name of the resource manually by setting the Closing out this issue for now, but feel free to reopen if you have an example where this isn't working. |
See also pulumi/pulumi#1518 which tracks adding the ability to suppress auto naming at a more coarse-grained level. |
@lblackstone , @lukehoban thanks for the quick answers. Highly appreciated! Can someone add the fact about autonaming more prominently to the official documentation? Even a small hint would be great. 👍 like some TL;DR stuff in the Getting started chapters e.g. https://pulumi.io/quickstart/azure/index.html I guess this would be very valuable to others because I think when you come from Terraform or another tool to deploy your cloud resources you get quickly confused like me by the default behavior of Pulumi. Especially when I take into account that the name parameter in the costructors for Pulumi Output objects is not the final name and you've to specify the desired name additionally in the That said, and because the pulumi/pulumi#1518 isn't available right now, I changed my exsiting code e.g. for deploying a resource group from const rg = new azure.core.ResourceGroup(`rg-${resource_prefix}`,
{ location: "West Europe"}
); to const rg = new azure.core.ResourceGroup(`rg-${resource_prefix}`,
{
name: `rg-${resource_prefix}`,
location: "West Europe"
}
); Obviously this worked 👍 but now one have to be careful because |
I did a evaluation of Pulumi if it could be a replacement for Terraform in Cloud projects. I was a bit baffled when I discovered that the Pulumi Azure backend adds always 8 random characters to a resource name
pulumi-azure/resources.go
Line 849 in cf8e011
pulumi-azure/resources.go
Line 844 in cf8e011
and why this is not configurable? Well personally I didn't find a possibility to switch off this behavior. According to the code above and where and how the corresponding function
AutoNameWithMaxLength
is called, it doesn't look like this could be configured in any way.So what's the technical background why the Azure Provider adds those random characters?
The text was updated successfully, but these errors were encountered: