Closed nicoride93 closed 5 months ago
Hi @nicoride93,
Each resource type has a regex that gets applied. This regex will likely contain characters that are not allowed for the resource. In the case of storage account, they cannot contain a ".". The Naming Tool will remove any of these characters and attempt to validate the name again. If it can, it will display a message (as in your screen shot above) of the valid name with the delimiter removed.
On the Reference page, you can view the current regex values for any resource type in the system. This information is also viewable on the Generate page after selecting a resource type and expanding the "Naming Guidelines" section.
Hope this helps!
-BryanSoltis
Hi @BryanSoltis Thanks for reaching out! The storage account doesnt support dashes
and in Azure doesnt support it either
Thanks!
Ah.. now I see your point! We recently put out a change to simplify the API for generating a name. As part of this, we only pass the "short name" value for each component, including the resource type. The issue you are seeing is because there are multiple resource types with the same short name value ("sa" in the case of a storage account). The code is finding a different resource type's regex and applying it, which is allowing the "-" to go through.
To resolve this, we can push a new version of the resourcetypes.json file to the GitHub. Once that is completed, you can update your local version with the updated file using the following process.
To update the resource types with the latest data:
If you want to, you could update your local version of the /settings/resourcetypes.json with the correct data. Specifically, you will want to do the following:
This will update your local configuration until we can publish the GitHub update. You can also use the "Export/Import" feature for the Resource Types on the Configuration page to update the data, if that helps.
Thank you for helping us find these bugs! I hope this helps and we will push the change out ASAP.
Awesome! Thanks! Is working now. Ill make sure that there are no duplicated values.
Thanks!
Hi @nicoride93,
I wanted to let you know that we pushed the updated resourcetypes.json file. You can use the Refresh process listed in my previous comment to update, if needed.
Also, in researching it more, I actually forgot about some functionality I put into the site that allows you update the Short Name value for a resource type directly within the UI. Here's how you can do it (without having to manually change the JSON)
This will change the resource type short name and avoid the issue you were seeing. I will work on adding functionality to this process to confirm the value is unique and this will be released in a future tool update.
Thank you for again for the great feedback and let us know how you like to tool!
-BryanSoltis
What's the suggest practice when the resource name does not support dash '-'? In this case, Azure does not allow us to use '-' for the storage account name. refers to azure doc What's the suggested character to use as the delimiter?
The AzNamingTool repo moved: https://github.com/mspnp/AzureNamingTool Please use the new repo to file a ticket if there are still questions or issues with the tool.
Hi,
Thanks for the tool. Is very useful! I was setting some names for my environment and found that is not aligned to what Azure asks for. IE. I created a storage account with dashes as delimiter and the generated name is with dashes. If I change the delimiter to period, it will eliminate the period.
Any guidance on this? Thanks!