mspnp / AzureNamingTool

The Azure Naming Tool is a .NET 8 Blazor application, with a RESTful API. The UI consists of several pages to allow the configuration and generation of Azure Resource names. The API provides a programmatic interface for the functionality.
https://aka.ms/azurenamingtool
MIT License
308 stars 604 forks source link

Wrong resource type output when generating single resource name #10

Closed eddieh-digitalcontrol closed 10 months ago

eddieh-digitalcontrol commented 10 months ago

Describe the bug When generating a name for a single resource where the category has multiple resource types causes the incorrect resource type abbreviation to be added to the name.

To Reproduce Steps to reproduce the behavior:

  1. Go to Generate
  2. Ensure 'Generate Single Resource Type Name' is selected
  3. Enter 'web' in resource type category filter
  4. Select 'Web/sites - Web App (app)' in the resource type dropdown
  5. Enter all required fields for units/projects/locations/etc
  6. Select generate
  7. The generated name contains the wrong resource type abbreviation

Expected behavior I expect the name to contain the abbreviation of 'app' instead of 'stapp', since the Web App was selected in the list.

Installation Method Installed using the docker container steps as outlined on the instructions page

Additional context It appears the first item in the resource type dropdown that starts with 'Web/sites' is being selected to generate the name instead of the selected value.

BryanSoltis commented 10 months ago

Thank you @eddieh-digitalcontrol for the submission!

This is related to the auto-complete functionality on the Generate page for the Resource Categories/Types. This will be fixe dint he next version (3.0.1).

BryanSoltis commented 10 months ago

You can test out the changes in the pre-lease here:

https://github.com/mspnp/AzureNamingTool/releases/tag/v3.0.1

Please let me know if you have any issues!

-Bryan

eddieh-digitalcontrol commented 10 months ago

Thank you for the update, name generation is working correctly!

BryanSoltis commented 10 months ago

Awesome! We will release the final v3.0.1 later this/next week with the included changes.