Welcome to Azure!
The short answer is that you can't rename resources (it's a popular request) but there's a lot that can be done during the resource creation process and there is a workaround if you find yourself needing to change the name of a resource group.
What determines my resource name?
Typically resources are named based on a name you provide either while configuring the resource or based on the resource group. For example, if you were to create a resource group named "AzureVMQuickstart" and then create a VM in the portal named "MyFirstVM", you'd get the following resources:
- MyFirstVM (Virtual machine)
- MyFirstVM-ip (Public IP address)
- MyFirstVM-nsg (Network security group)
- AzureVMQuickstart-vnet (Virtual network)
- MyFirstVM_OSDisk_1h3s4bcc97lw204... (Disk)
- MyFirstVM-13254 (Network interface)
There are some exceptions to this rule where you'll see a long string of characters for something but in general it's pretty clear what either the resource group name was or the resource name it was created from.
How do I change my resource or resource group name?
Changing the names of resource groups or resources once they've been made is one of the more popular requests that's still outstanding:
Voting on this helps to improve visibility and priority so I would encourage you to vote if you would like to see these features added.
While you can't change a resource group name, you can move all of the resources from your old resource group to a new resource group with a new name. This can take some time, however, and isn't recommended as part of a normal workflow.
This is a good writeup on how to move resources from one resource group to another from Steve Sherry:
https://adamtheautomator.com/rename-azure-resource-group/
As well as another simple CLI/PowerShell example along with an explanation on why this happens by Matthias Güntert:
https://www.azureblue.io/how-to-rename-an-azure-resource-group/
As far as resources are concerned, unfortunately those cannot be renamed at this time. Most often you do have some degree of control over the name during creation, however, which should help.