Closed donhaji closed 10 months ago
Hi @donhaji. Thank you for your feedback. Can you please elaborate on how or why you need additional regex validations? Currently the built-in regex validates the name based on the Azure resource. So even though your naming convention might use a delimiter, the regex only cares that it's a valid Azure resource name. Also, the Azure Naming Tool will only generate a name that follows your configuration. So, checking component lengths and your delimiter with an additional regex check has no value as long as you configured your naming convention in the tool correctly. Please let us know. Thanks!
Hi @jamasten - so the validation is all good and well. However, the other use case i would recommend is for matching / searching for resources once they have been created. This helps aid scripting and lookups for resources in Azure e.g. Az Cli.
Hi @donhaji,
The current version of the tool does allow for searching the Generated Names for a specific value. Entered text is searched against the Created By, Generated Name, Resource Type, and Components fields.
Are you requesting a new API function to search for names, as well?
Closed due to inactivity.
Is your feature request related to a problem? Please describe. Feature Request. The RegEx generated in the Reference section seems to generic and is far better to be broken down into options that match specific lookups for resources e.g.
Example: uks-dev-glb-hub-lvm-1 ComponentsLocation:UK South (uks) Environment:Development (dev) ProjAppSvc:Global Devops (glb) Subscriptions:Hub Gateway (hub) Type:Compute/virtualMachines (lvm) Instance:001 RegEx ^(?!.[.]$)(?!.-$)[^\/[]:|<>+=;,\?@&_*]{1,64}$
The Regex is too generic and will match almost any resource.
Describe the solution you'd like A clear and concise description of what you want to happen.
Either some more generated patterns that hardcode in specific details e.g. RegEx Patterns
Global ^(?!.[.]$)(?!.-$)[^\/[]:|<>+=;,\?@&_*]{1,64}$ Specific ^\w{1,3}-\w{1,3}-\w{1,3}-\w{1,3}-lvm-01 (or alternative regex)
Describe alternatives you've considered Alternatives is to create the specific RegEx manually.
Additional context Devops PIpelines can help utilise the regex better when using multiple Landing Zones with standard approach to naming. E.g. Subscriptions Landing Zone A Landing Zone B Landing Zone C
All Landing Zones have similar if not the same resources with potentially the same name. Having RegEx patterns when using Az Devops allows for better pipeline templating and control over resource generation.