Last Updated on April 1, 2025 by Arnav Sharma
Azure provides limited options for renaming resources after they are created. This can be challenging when you need to standardise naming conventions or make changes in an established environment. Below is an overview of which Azure resources can be renamed, which cannot, and potential workarounds.
Renamable Resources in Azure
Azure Subscriptions
Azure subscriptions can be renamed without affecting their functionality or connected resources.
How to Rename Subscriptions:
- Using Azure Portal
- Go to Cost Management + Billing.
- Select the subscription you want to rename.
- Click the rename option, provide a new name, and save the changes.
- Using PowerShell
- Use the
Rename-AzSubscriptioncommand to rename a subscription programmatically.
- Use the
Renaming a subscription only changes its display name while retaining the same subscription ID. This operation does not affect the resources within the subscription.
Non-Renamable Resources
Resource Groups
Resource groups cannot be renamed directly in Azure.
Workaround: Create a new resource group with the desired name, move resources from the old group to the new one, and then delete the original resource group.
Most Azure Resources
The majority of Azure resources cannot be renamed after creation. This includes:
- Virtual Machines
- Storage Accounts
- Virtual Networks
- Application Gateways
- And many others
The limitation exists because resource names are often used as unique identifiers and may also be part of DNS names or resource IDs.
Workarounds for Non-Renamable Resources
1. Recreate the Resource
Create a new resource with the desired name and identical settings, migrate data/configurations as needed, and delete the old resource.
2. Move Resources Between Resource Groups
If only the resource group name needs to change, move resources to a new group with the desired name.
3. Use Friendly Display Names with Tags
Add a “friendly name” using tags such as hidden-title. This does not change the actual resource name but helps with visual identification in the Azure Portal.
4. Specialized Renaming for Virtual Machines
For Virtual Machines, scripts can help:
- Disconnect dependent resources.
- Create a new VM with the desired name.
- Reattach all dependent resources.
- Delete the original VM.
This approach requires careful planning and testing.
Best Practices for Naming in Azure
- Plan Naming Conventions Before Deployment
- Establish clear naming conventions before creating resources.
- Document and follow these conventions consistently.
- Use Infrastructure as Code
- Define resources using tools like ARM templates, Bicep, or Terraform.
- This makes recreating resources with new names more manageable.
- Design for Replaceability
- Treat cloud resources as replaceable.
- Ensure configurations can be easily replicated if renaming is required.
I help organisations secure their cloud infrastructure and stay ahead of evolving cyber threats. Microsoft MVP and Certified Trainer, author of Mastering Azure Security, and founder of arnav.au — a platform for practical Cloud, Cybersecurity, DevOps and AI content.
Frequently Asked Questions
Yes, Azure subscriptions can be renamed without affecting their functionality or connected resources. You can rename a subscription through the Azure Portal by going to Cost Management + Billing, selecting your subscription, and clicking the rename option. Alternatively, you can use PowerShell with the Rename-AzSubscription command to rename it programmatically. The renaming only changes the display name while retaining the same subscription ID.
No, resource groups cannot be renamed directly in Azure. However, you can work around this limitation by creating a new resource group with your desired name, moving all resources from the old group to the new one, and then deleting the original resource group. This approach ensures all your resources maintain their functionality during the transition.
Virtual machines cannot be directly renamed in Azure. The recommended approach is to disconnect all dependent resources, create a new VM with your desired name and identical settings, reattach the dependent resources, and delete the original VM. This method requires careful planning and testing to ensure all configurations and connections are properly replicated.
Most Azure resources cannot be renamed because resource names are often used as unique identifiers and may be part of DNS names or resource IDs. Changing these names after creation could break dependencies, connections, and configurations. This design decision ensures the stability and integrity of resources in a deployed environment.
The best practices include establishing clear naming conventions before deploying any resources and documenting them consistently. Use Infrastructure as Code tools like ARM templates, Bicep, or Terraform to define resources, making it easier to recreate them with new names if needed. Additionally, design your resources to be replaceable so configurations can be easily replicated if renaming becomes necessary.