Giter VIP home page Giter VIP logo

mspnp / azurenamingtool Goto Github PK

View Code? Open in Web Editor NEW
311.0 12.0 615.0 6.28 MB

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.

Home Page: https://aka.ms/azurenamingtool

License: MIT License

HTML 58.49% C# 39.71% Bicep 0.74% Dockerfile 0.05% CSS 1.01%
azure best-practice naming-convention

azurenamingtool's People

Contributors

bryansoltis avatar dylan-asos avatar jocontr avatar paulschermers avatar theneedyguy avatar wipash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azurenamingtool's Issues

Unable to edit or remove generated names (one or a few at a time).

Tool version
Dec 5, 2023 (Commit e688d15)

Is your feature request related to a problem? Please describe.
I generated a few names to get familiar with the tool. The log is read-only and the "Purge" button is restricted. I would like to clean up the list... but I can't

Describe the solution you'd like
There should be a way to list, edit, or remove generated names..

Describe alternatives you've considered

Additional context

Enable the ability to do a bulk import of records into a custom component.

Tool version
V3.0.0

Is your feature request related to a problem? Please describe.
I am trying to do a bulk import of values for a custom component.

Describe the solution you'd like
Can we have the ability to programmatically do a bulk import of values into a custom component?

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Webhook doesn't seem to support pushing to MS Teams channel

Tool version
3.2.0

Describe the bug
MS Teams webhook URL pasted into web UI in azurenamingtool. No entries are created in teams channel.

To Reproduce
Steps to reproduce the behavior (translated choices from Norwegian Teams UI - text may or may not correlate to english Teams UI):

  1. Go to 'Teams'
  2. Click on 'Channel settings'
  3. Click on 'Connections'
  4. Click on 'Edit'
  5. Click on 'Configure incoming webhook'
  6. Type in a name
  7. Click on 'Create'
  8. Copy URL
  9. In Azurenamingtool, Click "Admin" --> "Generation webhook"
  10. Paste in URL and click "Save"

Expected behavior
Generated names should appear in Teams channel

Screenshots
Nothing appears in Teams

Installation Method
Click-ops, installed as Container App, Auth added

Saving selected Resource Types while generating Multiple Resource Type Names

Tool version
v4.0.0

Is your feature request related to a problem? Please describe.
Each time I need to generate names for Multiple Resource Types I have to select resources.

Describe the solution you'd like
While generating names for Multiple Resource Types, it would be useful to save selected Resource Types as pre-set. So I don't have to re-select resources each time.

"Orgs" component excluded

Tool version
v4.0.0

Describe the bug
Why, in the default settings, has the Orgs component been excluded for those resources whose names must be globally unique (e.g. Storage Account)? Wouldn't it be more correct to include it ?

Leverage "Optional" functionality while generating multiple resource type names

Tool version
v4.0.0

Is your feature request related to a problem? Please describe.
Optional or excluded components are required during the filling of fields (Generate section), when the Generate Multiple Resource Type Names option is selected. The names of excluded components do not appear in the generated names, ALWAYS.
It may happen instead that the name of a component sometimes needs to be included, while at other times it should be omitted in generated names.
So, it would be useful to extend the usage of 'optional' component when the Generate Multiple Resource Type Names option is selected.

Regards,
Luca

Resource instance autoincrement feature does not adhere to minimum length requirement of field

Tool version
3.3.0

Describe the bug
The instance component is configured for a minimum length of 2 and a maximum length of 5. Apply delimiter before and apply delimiter after are both set. The allow duplicate names is disabled.
Using the /api/ResourceNamingRequests/RequestName get, with the resourceInstance defined as "00", the first two calls to the API provide a resource name with a instance of 00 and 01 as expected, however the third call returns 2 without the leading zero and would fail the requirement to have a minimum length of 2 characters.

To Reproduce
Steps to reproduce the behavior:

  1. Edit the instance component in Configuration/Base Configuration/Components
  2. Change the minimum length from 1 to 2 and apply the change
  3. Click Admin
  4. Under site settings, enable "Allow Duplicate Names"
  5. Click Generated Names Log
  6. Click Purge Generated Names Log to remove all currently issued names
  7. Click Admin
  8. Under site settings, disable "Allow Duplicate Names"
  9. Generate a API call with the resourceInstance equal to "00"
  10. Resource is created with a instance of "00"
  11. Re-run the API call without changing the resourceInstance
  12. Resource is created with a instance of "01" and a message is returned by the API - "The resource instance has been auto-incremented to the next value."
  13. Re-run the API call without changing the resourceInstance
  14. Resource is created with a instance of "2" and a message is returned by the API - "The resource instance has been auto-incremented to the next value."

Expected behavior
The expected behavior is that the resourceInstance on the third call would maintain the leading zero, like the second API call and would also adhere to the minimum length of 2 set for the instance component.

Screenshots
image

Installation Method
Azure Naming tool is running on a PodMan docker image on Windows 11 with WSL2 enabled.

Config Import Screen working indefinitely

Describe the bug
When we import a config a pop up shows (Global) Global Config Update Succeeded whereas the screen shows Working indefinitely and does not go back to Configuration page or Home page.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Configuration
  2. Click on Global Configuration under General Configuration
  3. Scroll down to Import Global Configuaration
  4. Paste the backed up json of global config
  5. Click on Import button
  6. Click on OK button on Attention pop up
  7. Click on OK button on Attention pop up again

Expected behavior
A pop up showing Success / Failure in loading the global config and go back to Configuration page or home page.

Screenshots
image

Installation Method
As per official document here.

Double delimiter when no optional component

Tool version
3.1.1

Describe the bug
When not populating an optional component, two delimiters are present in the generated name instead of one.

To Reproduce
Steps to reproduce the behavior:
I have two custom components added to my name.

  1. Parent Resource (Optional) - Open ended text

  2. Resource Name - Open ended text

  3. Go to Generate

  4. Choose item and populate all fields, except optional.

  5. Click Generate

  6. See that output has two delimiters where the optional component would be, had it been populated.

Expected behavior
I would expect the system to recognize I did not populate the optional field, and only insert one delimiter.

Screenshots
If applicable, add screenshots to help explain your problem.
CustomComponent
GeneratedName

Installation Method
FTP upload to Azure Web app

Missing location: Sweden Central

Is your feature request related to a problem? Please describe.
The Azure location Sweden Central is missing in the Azure Naming Tool. We're using version 3.1.0 and the configuration have been updated today but this location is still missing.

Describe the solution you'd like
Being able to choose Sweden Central when generating a resource name.

Unable to buiild with .Net SDK

Hello,
trying to deploy as a stand-alone site for IIS. Following your instructions at
https://github.com/mspnp/AzureNamingTool/wiki/Run-as-a-Stand%E2%80%90Alone-Site
Using both .NET SDK 8 or 7 I receive

dotnet build

R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'BlazorDownloadFile (>= 2.4.0.2)' for 'net7
.0'. [R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Modal (>= 7.1.0)' for 'net7.0'. [
R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Blazored.Toast (>= 4.1.0)' for 'net7.0'. [
R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Microsoft.VisualStudio.Azure.Containers.To
ols.Targets (>= 1.19.5)' for 'net7.0'. [R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore (>= 6.5.0)' for 'ne
t7.0'. [R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'Swashbuckle.AspNetCore.Annotations (>= 6.5
.0)' for 'net7.0'. [R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Collections (>= 4.3.0)' for 'net7.0
'. [R:\AzureNamingTool\AzureNamingTool.sln]
R:\AzureNamingTool\AzureNamingTool.csproj : error NU1100: Unable to resolve 'System.Runtime.Caching (>= 7.0.0)' for 'ne
t7.0'. [R:\AzureNamingTool\AzureNamingTool.sln]
Failed to restore R:\AzureNamingTool\AzureNamingTool.csproj (in 125 ms).

Am I missing something ?

Thank you in advance.

Regards,
Red.

Build as container

Tool version
The newest one

Describe the bug
Hello team, I'm trying to build NCT tool as a docker. I was following your youtube guide and the first issue I faced was "Docker destkop - unexpected wsl error" informing that there was an error while executing a wsl command. I tried it on azure Standard D4s v3 (4 vcpus, 16 GiB memory) as you mentioned in video. So, then i build another vm Standard D4ds v4 (4 vcpus, 16 GiB memory) in azure. Here this error didn't happen

To Reproduce
So, while building docker on Vm Standard D4ds v4 (4 vcpus, 16 GiB memory) I managed to install docker without any issues, I downloaded they NCT as zip and put it on destkop and downloads and unzipped, I run "docker build -t azurenamingtool ." and then the error in cmd was C:\Users\Adminpawel\Desktop\AzureNamingTool-main>docker build -t azurenamingtool .
[+] Building 0.2s (2/2) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 2B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 2B 0.0s
ERROR: failed to solve: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount2933918541/Dockerfile: no such file or directory

View build details: docker-desktop://dashboard/build/default/default/ke6nxhmpdk3hunwdzbluayagr

Expected behavior
Docker should install however it didnt
Screenshots
image
image

Installation Method
As a docker

Additional context
n/a

Could you please assist?

Ability to refine RegEx / provide options to make more specific

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.

Windows VM names longer than 15 characters passing validation

Describe the bug
When generating a name for Compute/VirtualMachines - Windows (vm), the max length does not appear to be validated, which allows names longer than 15 characters to be generated successfully.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Generate'
  2. Click on 'Type to search resource types'
  3. Scroll down to 'Compute/virtualMachines - Windows (vm)'
  4. Fill out parameters and pad out instance field to make it longer than 15 characters
  5. Click Generate

Expected behavior
Validation fails and error is returned indicating name is too long.

Screenshots
image

Installation Method
Azure Web App Using GitHub Action

Additional context

General Refactors for K8s hosting

Is your feature request related to a problem? Please describe.

Thanks for the effort on this app, it does a lot of what I want!

In order to host in Azure Kubernetes Service, the solution needs a few refactors, mainly around logging to conform to https://12factor.net/logs and in particular write to stdout to make pod debugging significantly easier

Would need to add liveness and heath check endpoints for the k8s to manage + a few other bits. I'm happy to pick this up and will raise a series of small, incremental PRs that reference this issue, if that's OK with you.

There are some additional patterns you could take more advantage of, i.e.

  • A lot of your classes seem to use static methods extensively. If you used instances and let DI create them, then you could inject other items (such as ILogger),

    • This would need a gradual unwind as patterns like this tend to propagate out into the codebase.
  • Quite a lot of duplication - some general extractions and tidy up would reduce code considerably.

  • try/catch - a global handler could probably do a lot of the work and achieve what you want, which would unwind the repeated try/catches through the layers.

Overall - there's a few approaches that would reduce the amount and complexity of the code, and hopefully make it easier to maintain. If you're not against these, I'll contribute small changes that aim for these goals over time.

Additional context
Add any other context or screenshots about the feature request here.

Document relation to Azure Cloud Adoption Framework naming convention

Tool version

N/A

Is your feature request related to a problem? Please describe.

Microsoft CAF documentation contains reference to the Azure Naming Tool at
https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging

image

But the Azure Naming Tool documentation does not seem to contain any reference or explanation how the tool relates to the conventions recommended by Microsoft.

Moreover, it is missing reference to the Terraform and its Azure CAF provider, i.e. https://registry.terraform.io/providers/aztfmod/azurecaf/latest/docs, which is de-facto standard for naming Azure resources in any production-grade IaC.

Describe the solution you'd like

Update the Azure Naming Tool documentation explaining how it relates to the recommended best practices and the other tools.

Describe alternatives you've considered

N/A

Additional context
Add any other context or screenshots about the feature request here.

Issue generating names via API call from a PowerShell script

Describe the bug
I am experiencing an issue when calling the API via rest method, I get the error that some required resources have no values provided.
Actual error "Invoke-RestMethod: {"resourceName":"RESOURCE NAME NOT GENERATED","message":"You must supply the required components. ResourceIdentifier value was not provided. ResourceTypeSubset value was not provided. ResourceEnvironments value was not provided. ","success":false}"

To Reproduce
Steps to reproduce the behavior:

  1. Review the PowerShell script on the right side.
  2. Create a file called requestBody.json which contains the API request body
  3. Create a custom entry on the Azurenaming tool config section, call it ResourceTypeSubset [array of entries]
  4. Create a custom entry called ResourceIdentifier [array of entries]
  5. Run the PS script and verify if the error is the same.

Expected behavior
I expect to see the generated name, this worked well up until yesterday the 25th of September 2023

Screenshots
I've attached a screenshot of my config as well as the error from VSCode

Installation Method
I am running this from container app.

Additional context
Add any other context about the problem here.
Selected September 26 2023 13:53:37

Data Collection - related resource types

Tool version
4.0

Is your feature request related to a problem? Please describe.
It would be nice to have an option to keep all names in one place

Describe the solution you'd like
If possible, please add Data Collection Rule (dcr), Data Connection Endpoint (dce) and data collection rule association (dcra) in types .json. I guess the types should be under Insights collection.

Describe alternatives you've considered
manually create names for the abovementioned resources.

Additional context
Add any other context or screenshots about the feature request here.

Resource type unavailable for privateEndpoints

Hi We are looking to have the naming guidelines for the Microsoft.Network/privateEndpoints. However it is not available in the current resource types list. Could you please let us know if this will be added ? Thanks

Name availability checking against Azure tenant

Is your feature request related to a problem? Please describe.
It's possible that users generate a name but do not use it and therefore the next time a resource name is generated it will increment to the next available name.

Describe the solution you'd like
AzureNamingTool should scan the Azure tenant to see whether the name is taken and avoid incrementing.

Describe alternatives you've considered
We could do a regular scan against our Azure tenant and then delete unused names using the AzureNamingTool.

Additional context
I can imagine this introducing a problem/conflict in a heavy traffic environment where the tool is being used regularly.

Azure App Service Logout

Tool version
3.2.0

Describe the bug
When logged in with Azure AD Authentication and users click the 'logout' button in the top right corner, the screen reloads and the "User: [email protected]" banner goes away. I have my front-channel logout URL set to url/.auth/logout/complete, and after the user logs out, they are still able to use the tool.

To Reproduce
Steps to reproduce the behavior:

  1. Setup Azure App Service Auth

Expected behavior
Logging out would navigate to the Microsoft login screen. Requiring login before next use of the tool.

Screenshots
If applicable, add screenshots to help explain your problem.
NamingTool02
NamingTool01
NamingTool03

Installation Method
Azure App Service

Additional context
Add any other context about the problem here.

Missing resource names/short names for Container Apps and Container Apps Environment.

Tool version
v3.1.1

Describe the bug
Missing some of the resource types and their abbreivations, specifically Container Apps and Container Apps Environments.

Resource Resource provider namespace Abbreviation
Container apps Microsoft.App/containerApps ca
Container apps environment Microsoft.App/managedEnvironments cae

To Reproduce
N/A

Expected behavior

Screenshots
N/A

Installation Method
N/A

Additional context
Please see this for reference: https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations

Action required: migrate or opt-out of migration to GitHub inside Microsoft

Migrate non-Open Source or non-External Collaboration repositories to GitHub inside Microsoft

In order to protect and secure Microsoft, private or internal repositories in GitHub for Open Source which are not related to open source projects or require collaboration with 3rd parties (customer, partners, etc.) must be migrated to GitHub inside Microsoft a.k.a GitHub Enterprise Cloud with Enterprise Managed User (GHEC EMU).

Action

✍️ Please RSVP to opt-in or opt-out of the migration to GitHub inside Microsoft.

❗Only users with admin permission in the repository are allowed to respond. Failure to provide a response will result to your repository getting automatically archived.🔒

Instructions

Reply with a comment on this issue containing one of the following optin or optout command options below.

✅ Opt-in to migrate

@gimsvc optin --date <target_migration_date in mm-dd-yyyy format>

Example: @gimsvc optin --date 03-15-2023

OR

❌ Opt-out of migration

@gimsvc optout --reason <staging|collaboration|delete|other>

Example: @gimsvc optout --reason staging

Options:

  • staging : This repository will ship as Open Source or go public
  • collaboration : Used for external or 3rd party collaboration with customers, partners, suppliers, etc.
  • delete : This repository will be deleted because it is no longer needed.
  • other : Other reasons not specified

Need more help? 🖐️

Unable to switch between "Global admin" and AAD authenticated user.

Tool version
3.2.0

Describe the bug
ANT configured with Authentication:
-I am able to access ANT as a EntraID domain user, and the app showing me as logged in.
-When I then log out, I am also able to log in as Global admin
-When logging out as global admin, it is no longer possible to re-authenticate as EntraID domain user.

To Reproduce
Steps to reproduce the behavior:

  1. Enter ANT, login is OK and automatic
  2. Click on 'Log out'
  3. Log in as "Global admin" with special password
  4. Log out from global admin role

Expected behavior
I expect to then be able to re-login as domain user, but this is not possible

Screenshots
Before logging out from global admin
image

After logging out from global admin
image

Workaround:

  • closing browser tab, re-entering application, then I am re-logged in as domain user:
    image

Installation Method
Clickops-install as container app

Exclude/Include/Custom delimiter for specific resource types

Is your feature request related to a problem? Please describe.
Managed disks for example, can include a delimiter, but the tool does create disk names with delimiters.
Its great that for most resources it auto-removes the delimiter, but there are environments where clients dont want to use delimiters for specific resource types, and want them in others.

image

Describe the solution you'd like
A button on the Edit Resource Type window in the same section as minimum/maximum length requirement.

Describe alternatives you've considered

allowing delimiters for disk names would probably be the easiest solution, but then people who dont want delimiters in their disk names are forced to have them or manually remove them...

manually adding the delimiter to the disk name after generating it - not ideal

Additional context
image

Ressource list not in sync with Cloud Adoption Framework

Tool version
4.0.1

Is your feature request related to a problem? Please describe.
Not sure if it's intended to be this way but the ressource name default list seem to have a drift from the Cloud Adoption Framework ressource abbeviation list: https://learn.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/resource-abbreviations

Example: App Service Plan (Microsoft.Web/serverFarms) is call "plan" in ANT but "asp" in the cloud adoption framework.

Describe the solution you'd like
Is there a way to keep the list updated in the app? That not a dealbreaker but a nice feature to keep things updated

Describe alternatives you've considered
Manualy change value

Allow configuration of uppercase resource names for selected resource types

Tool version
4.0.0

Is your feature request related to a problem? Please describe.
Our naming convention uses uppercase resource names where possible, so we would like the naming tool to allow generation of uppercase names depending on the resource type.

Describe the solution you'd like
I would like to have a toggle switch on each resource type that allows the selection of upper/lower case names. This should be a per resource option and to ensure it is not incorrectly used we could check the resource type regex to ensure it supports uppercase names before showing this new toggle.
If this new toggle is set to uppercase, the generated name would be converted to uppercase at generation time.
The examples in the reference section should also be converted to uppercase if this switch is toggled for the resource type.

Instance Length and VM Delimiters

Tool version
3.2.0

Describe the bug
Bug #1
I have my instance minimum and maximum set to 2. The intention is to require a two digit instance id. (01-99). The tool allows a single digit instance number. One attachment shows the instance settings, the other is the generated names log that has single digit instance ids listed.

Bug #2
When generating VM names, it doesn't seem to be consistently honoring the delimiter requirements. I was able to generate a VM with dash delimiters in the name. I cleared the cache and it persisted. Attachment shows the generated name log, the items circled in red were after I cleared the cache.

Expected behavior
1 - Would only allow a two digit number.
2 - Would not input dashes in the name.

Screenshots
If applicable, add screenshots to help explain your problem.
ANT_GeneratedNames
ANT_InstanceComponent

Installation Method
Azure Web App

Ability to do a bulk import of records into a custom component via Pwsh API call

Tool version
2.7.0

Describe the bug
I am checking if it is possible for me to import bulk records into a custom component via a Pwsh API call?

To Reproduce

This is a post body to create an NSG, would it be possible to have something similar but intended for adding multiple records under the BusinessUnit key?
Steps to reproduce the behavior:
"NetworkSecurityGroup1" = @{
ResourceType = "nsg"
customComponents = @{
ResourceEnvironments = "prod"
BusinessUnit = "marketing"
ResourceRegions = "san"
ResourceTypeSubset = "subn"
ResourceIdentifier = "db"
}
}

Expected behavior
I am expecting to have multiple records under the businessunit key.

Screenshots
If applicable, add screenshots to help explain your problem.

Installation Method
The installation is running on a container in Azure.

Additional context
Add any other context about the problem here.

Cant' fork version 4.0.0 and deploy to Azure App Service

Tool version
3.3.0

Describe the bug
I am trying to follow the directions to upgrade to 4.0.0 to fix the increment issue however it will not allow me to fork version 4.0.0 it just forks version 3.3.0. How do we actually perform an upgrade to 4.0.0?

To Reproduce
Steps to reproduce the behavior:
Trying to follow your migration document but step 5 only deploys version 3.3.0:

  1. BACKUP your current Azure Naming Tool installation
  2. Backup code modifications/customizations
  3. Review the Installation process for your environment
  4. Update your hosting environment to .NET 8
  5. Deploy the tool using your desired Installation process
  6. Confirm the site is running properly
  7. RESTORE your configuration

Expected behavior
I was expecting to go to release 4.0.0. and create a fork from there and deploy.

Screenshots
If applicable, add screenshots to help explain your problem.

Installation Method
Run as an Azure Web App Using GitHub Action

Additional context
I am not a Github expert so this very easily could be user error, I just don't know how to get version 4.0.0 up to our Azure web app.

API does not work with Azure App Service Authentication enabled

Describe the bug
The API does not authenticate with API Keys when Azure App Service Authentication is enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Enable App Service Authentication in Azure
  2. Restart the App Service
  3. Try calling API using curl / python or any tool

Expected behavior
Json response with name and status code.

Additional context
The API works perfectly fine when Azure App Service Authentication is disabled.

Navigation links should be relative to application path

Tool version
All

Describe the bug
Navigation links are hard-coded to "/". They should be updated to be relative to where the application is running.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Installation Method
A description of the installation environment for the Azure Naming Tool.

Additional context
Add any other context about the problem here.

Administration not possible

Tool version
4.0.1, but since a couple of versions the problem exists

Describe the bug
I have not been able to log in as admin for several versions. The password seems to work. As soon as I have logged in, I get the menu entry Admin Log. But under Admin, I still only see the option to enter the password, the configuration options are not displayed.

I see an error in the logs after login:
INFORMATION | Global Admin logged in.
ERROR | There was a problem verifying connectivty. Error: String '' was not recognized as a valid Boolean.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Admin'
  2. Enter 'Global Admin Password' and 'Login'
  3. Click on 'Admin Log'

Expected behavior
I would like to see the administrative settings again.

Screenshots
image

In the picture you can see that I am logged in (Logout, Admin Log) but still only the input for the password is displayed.

Installation Method
Azure Web App Using GitHub Action

Additional context
If it is too time-consuming to solve the problem, I would be interested to know whether resetting the configuration would help, this is only in my personal lab. Maybe you can add this to the documentation, then I can try it.

Wrong resource type output when generating single resource name

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.

Azure Data Factory Naming and dashes

Tool version
4.0 / 4.0.1

Describe the bug
Azure Data factory naming for factory or linked service does not correspond to standard.

To Reproduce
Steps to reproduce the behavior:

  1. Create any linked service or data factory with standard rules, using dash as delimiter

Expected behavior

  • data factory - dashes are omitted
  • linked services - dashes are omitted

Deployed 4.1.0 and just getting default Azure App Service page.

I just deployed version 4.1.0 to a new app service and the workflow task completed successfully but all that is displayed is the default Azure app service page indicating "your app is running and waiting for content?

I deployed 4.0.1 using the same install process with no issue? Let me know if you need any logs. I've deleted the app services and followed the install for "Run as an Azure Web App Using GitHub Action" again resulting in the same issue.

Align with recommended abbreviations

Tool version
v3.1.1

Is your feature request related to a problem? Please describe.
The abbreviations used by the tool do not match the Recommended abbreviations for Azure resource types

For example, Microsoft.Web/serverFarms is listed as asp in the recommendation, and in the AzureNamingTool it is configured as plan.

In this example, I think plan takes preference over asp seeing the unrelated resemblance with asp.net.

Describe the solution you'd like
It would be good if these resources would be aligned, so that we can refer to a human readable resource that matches the default configuration of the tool. In this case I would suggest updating the recommendation.

Describe alternatives you've considered
I have considered changing the configuration of the tool, but that would be overwritten when updating the configuration in the tool.

Change the order of components names in Generated Name

Hi,

I would like to have different order of components than the current one.

Eg. Currently generated name pattern is: "ResourceType""delimiter""ApplicationName""delimiter""environment""delimiter""InstanceNumber" is fixed.
But I would like to have "ApplicationName""delimiter""ResourceType""delimiter""environment""delimiter""InstanceNumber"

where ApplicationName is 1st then followed by resource type

Short Name must be...

Tool version
Current version: 3.2.0

Describe the bug
In configuration section > Current Projects/Apps/Services when I edit the Project/App/Service.
It says that: short Name must be 1-3 characters.

To Reproduce
N/a

Expected behavior
I need it to be max 4 or even 5, how can I change it?

Screenshots
image

Installation Method
n/a

Additional context
I need it to be max 4 or even 5, how can I change it?

Issue Generating Name for Windows VM

Describe the bug
When trying to generate a name for a Windows VM it always generates a name for a Linux VM so the delimiter is present when it shouldn't be in the name. See attached pic.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Generated
  2. Select Compute for category
  3. Select Compute/virtualMachines - Windows (vm)
  4. Fill out all fields
  5. Click Generate

Expected behavior
When you generate a name for a Windows VM it should generate a name for a Windows (not Linux) VM.

Screenshots
If applicable, add screenshots to help explain your problem.

Installation Method
Docker Container

Additional context
Version 3.02

image

Json Giving error

Tool version
3.1.0
Describe the bug
Terraform giving error

To Reproduce
I am configured the components in naming tool according to company standards.
I am successfully able to run the API - Resource request name from the swagger tool using bellow Json

curl -X 'POST'
'https://test-app/api/ResourceNamingRequests/RequestName'
-H 'accept: /'
-H 'APIKey: ***********************************'
-H 'Content-Type: application/json'
-d '{
"resourceEnvironment": "t",
"resourceInstance":"03",
"resourceOrg": "m1",
"resourceProjAppSvc": "sap",
"resourceType": "vm",
"resourceid": 85,
"resourceunits/Depts": "db",
"customComponents": {
}
}'

Getting error when I run it through terraform .
Here is my terraform script where i am using data http block to generate the name using terraform

locals {
common_request_body = {
"resourceEnvironment": "t",
"resourceInstance":"01",
"resourceOrg": "m1",
"resourceProjAppSvc": "sap",
"resourceType": "vm",
"resourceid": 85,
"resourceunits/Depts": "db",
"customComponents": {
}
}
json_common = jsonencode(local.common_request_body)
}

data "http" "resource_naming_request" {
url = var.url
method = "POST"
request_headers = {
Content-Type = "application/json",
APIKey = var.APIKey
}

request_body = var.is_subscription ? null : local.json_common

}

response_content = "{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1\",\"title\":\"One or more validation errors occurred.","status":400,"traceId":"00-a6326ea594869925ab26254a47563f80-f4ba9b7b845000-00","errors":{"Name":["The Name field is required."],"DisplayName":["The DisplayName field is required."]}}"
Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Installation Method
A description of the installation environment for the Azure Naming Tool.

Additional context
Add any other context about the problem here.

Pre-built Docker images

Tool version
N/A

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
I wanted to deploy the solution and noticed that I need to build the Docker image myself. It would be awesome if this project could publish a Docker image to either Docker Hub or as a GitHub package so that users can easily deploy the container and keep up-to-date with the project. That would make it super easy for all the container scenarios to deploy the application.

Describe alternatives you've considered
N/A

Additional context
There is a complete description here that builds the image and pushes it as a GitHub artifact: https://docs.github.com/en/actions/publishing-packages/publishing-docker-images#publishing-images-to-github-packages

Thank you!

Creating multiple resources using the API

Describe the bug
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "00-26b70131132fac2aeb0061ff19e00c27-461a02b87ac1001c-00",
"errors": {
"$": [
"'c' is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0."
],
"request": [
"The request field is required."
]
}
}

To Reproduce
Steps to reproduce the behavior:
Create a request in this form:
curl -X 'POST'
'https://aznamingtool-sbsa.azurewebsites.net/api/ResourceNamingRequests/RequestName'
-H 'accept: /'
-H 'APIKey: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
-H 'Content-Type: application/json'
-d '[
{
"ResourceType":"nw",
"customComponents":{
"ResourceEnvironments":"nonprod",
"BusinessUnit":"marketing",
"ResourceRegions":"san"
}
},
{
"customComponents":{
"ResourceType":"kv",
"ResourceEnvironments":"nonprod",
"BusinessSegment":"marketing",
"ResourceRegions":"san",
"ResourceIdentifier":"infra"
}
},
{
"ResourceType":"rtt",
"customComponents":{
"ResourceLocations":"san",
"BusinessSegment":"marketing",
"ResourceEnvironments":"nonprod",
"ResourceIdentifier":"default"
}
},
{
"ResourceType":"as",
"customComponents":{
"ResourceEnvironments":"nonprod",
"BusinessSegment":"marketing",
"ResourceRegions":"san"
}
},
{
"ResourceType":"vnet",
"customComponents":{
"ResourceEnvironments":"nonprod",
"BusinessSegment":"marketing",
"ResourceRegions":"san"
}
},
{
"ResourceType":"rt",
"customComponents":{
"ResourceEnvironments":"nonprod",
"BusinessUnit":"marketing",
"ResourceRegions":"san",
"ResourceIdentifier":"default"
}
},
{
"ResourceType":"subn",
"customComponents":{
"ResourceEnvironments":"nonprod",
"BusinessUnit":"marketing",
"ResourceIdentifier":"db"
}
},
{
"ResourceType":"nsg",
"customComponents":{
"ResourceEnvironments":"nonprod",
"BusinessUnit":"marketing",
"ResourceRegions":"san",
"ResourceTypeSubset":"subn",
"ResourceIdentifier":"db"
}
}
]'

Expected behavior
Multiple names to be create for an example:
nsg-san-marketing-nonprod-subn-db

Screenshots
If applicable, add screenshots to help explain your problem.

Installation Method
A description of the installation environment for the Azure Naming Tool.

Additional context
I am trying to create multiple resources using this tool, I have managed to create one but I am wondering if I can have a single PS script that can generate all names.

The script below does what I want perfectly.

Azure Naming Tool API URL

$apiUrl = "https://aznamingtool-sbsa.azurewebsites.net/api/ResourceNamingRequests/RequestName"

$keyVaultName = "kv-san-nonprod-poc"
$secretName = "APIKey"

Retrieve the API key from Key Vault

$apiKey = (Get-AzKeyVaultSecret -VaultName $keyVaultName -Name $secretName).SecretValueText

Request Body

$requestBody = @{
ResourceType = "nsg"
customComponents = {
ResourceRegions = "san"
BusinessUnit = "marketing"
ResourceEnvironments = "nonprod"
ResourceTypeSubset = "subn"
ResourceIdentifier = "db"
}
}

Convert the request body to JSON

$jsonBody = $requestBody | ConvertTo-Json

Make the API request with the API key in the header

$headers = @{
"APIKey" = $apiKey
"Content-Type" = "application/json"
}

$NSGresponse = Invoke-RestMethod -Uri $apiUrl -Headers $headers -Method Post -Body $jsonBody

Output the response from the API

$NSGresponse

Extract the NSG name from the API response

$NSGname = $NSGresponse.name # Replace 'name' with the actual JSON key for the NSG name

Output the NSG name

Write-Host "The NSG name is: $NSGname"

500 Error from AppService

I followed the instructions to deploy as an Azure Web App using Github Actions. Everything deployed as expected, but when I open the web app url I get a 500 error. The only way I can get in is to turn off authentication. Am I missing something? I'm pretty new to Azure so any assistance would be appreciated.

HTTP Error 503. The service is unavailable.

Hello,
I'm trying to run AzureNamingTool as Stand-Alone Site (IIS on W2012 R2 + ASP.NET Core Runtime 8.0.1 Hosting Bundle).
I'm getting the error Service Unavailable - HTTP Error 503. The service is unavailable.
In the Event Viewer this error appears (and the App Pool stops):

Faulting application name: w3wp.exe, version: 8.5.9600.16384, time stamp: 0x5215df96
Faulting module name: coreclr.dll, version: 8.0.123.58001, time stamp: 0x65684720
Exception code: 0xc00000fd
Fault offset: 0x0000000000099df7
Faulting process id: 0x12b0
Faulting application start time: 0x01da5a14e673207f
Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
Faulting module path: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.1\coreclr.dll
Report Id: 2512dbda-c608-11ee-8134-0050569b1778
Faulting package full name:
Faulting package-relative application ID:

The AppPool has the Load User Profile set to True (otherwise a .NET Runtime error appears in the Event Viewer related to Category: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager)

Any help would be appreciated.

Thank you.

feature: support for availability zone multi-instance app service plans

Is your feature request related to a problem? Please describe.

Feature:

add support for multi-instanced app service plans.

Problem:

I had deployed the aznamingtool container to a shared app service plan that is configured across 3 availabilty zones.
Using a terraform module to make various name requests to the aznamingtools rest api to generate names, the app UI would lock up and eventually not responds.
After looking into the adminlogs I had noticed that the adminlogmessages.json and generatednames.json files would sometimes corrupt in the azure file share.
I had configured the webapp with session affinity which helped but still saw the issue with adminlogmessages and generatednames logs conflicts and stating the "title":"ERROR","message":"The process cannot access the file \u0027/app/settings/adminlogmessages.json\u0027 because it is being used by another process.".

Describe the solution you'd like

  • rest API endpoint to generate a collection of names.
  • Support for availability zones app service plans.
  • Alternate data store for config and logs (not sure its im about out of my depth on application architecture).

Describe alternatives you've considered

  • current workaround was to deploy the application on a seperate app service plan.
  • when deployed on teh az app service plan, i had enabled session affinity within the webapp which helped but the rapid api calls to generate names hitting various instances caused the updates to the json files to corrupt.

Additional context

Location missing - Central Poland

Tool version
Current version: 3.1.1

Is your feature request related to a problem? Please describe.
Its missing location Central Poland

Describe the solution you'd like
Adding location Central POland

Describe alternatives you've considered
Non alternative

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.