Function app and logic app

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:

  1. 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.
  2. Using PowerShell
    • Use the Rename-AzSubscription command to rename a subscription programmatically.

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

  1. Plan Naming Conventions Before Deployment
    • Establish clear naming conventions before creating resources.
    • Document and follow these conventions consistently.
  2. Use Infrastructure as Code
    • Define resources using tools like ARM templates, Bicep, or Terraform.
    • This makes recreating resources with new names more manageable.
  3. Design for Replaceability
    • Treat cloud resources as replaceable.
    • Ensure configurations can be easily replicated if renaming is required.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.