Generating Azure Resource Names According to Naming Convention with #ChatGPT

Oleksandr Krakovetskyi
The DevRain Tech Blog
3 min readJan 30, 2023
Created by Justin O’Connor

If you are working with Microsoft Azure, the common task is creating a set of Azure services within resource group.

Microsoft designed the named convention and best practices to be used for your Azure services. In general, it looks like the following:

Components of an Azure resource name

More often, you don’t need to overcomplicate the names. E.g., you can use simplified form like <resource type>-<project name>-<purpose>. Let’s automate Azure resource name creation with #ChatGPT.

Let’s use the following prompt:

I need to create an Azure resource group, Azure App Service for the chatbot endpoint, Azure App Service for the configuration panel, Azure Cognitive Service for Language, and Azure Blob storage.

I want to use “devrain” as a project name. If we have multiple services of the same type, please add a purpose to the end of the name. Use lower case for names.

Example of names:
- Azure Blob Storage: st-devrain
- Azure Front Door: afd-devrain

Generate a list of Azure resource names using the best practices from Microsoft and format is as a table (Azure service name, Resource name).

Take abbreviations from the following text:

The Azure Naming Tool generates Azure-compliant names and can help you standardize and automate your naming process. For more information, see Azure Naming Tool Overview.

<copy-paste from Abbreviation examples for Azure resources — Cloud Adoption Framework | Microsoft Learn>

Yes, the prompt was created after multiple tries.

The answer is:

ChatGPT output

Brilliant! Now I can play with different project names and Azure service configuration:

Please change project name to “mycompany” and propose new names for the following list of Azure services:
- Azure Resource Group
- Azure App Service
- Azure Cognitive Service for Language
- Azure Blob Storage
- Azure App Service Plan

The result is not something I was expecting:

But adding “You understood me wrong. I want to see rg-mycompany, as-mycompany etc.” gave me exactly what I need:

Probably I just killed at least one startup right now ;)

--

--

Oleksandr Krakovetskyi
The DevRain Tech Blog

CEO DevRain, CTO DonorUA, Microsoft Regional Director, Microsoft Artificial Intelligence Most Valuable Professional, Ph.D. in Computer Science.