18

I created an Azure Function but didn't pay attention to the name of the App Service being created.

Is it possible to rename an Azure App Service from the Azure Portal? I couldn't find an obvious way to do it.

enter image description here

gagarine
  • 4,190
  • 2
  • 30
  • 39
Randy Minder
  • 47,200
  • 49
  • 204
  • 358
  • 1
    You'll have to recreate one – Thomas Apr 15 '18 at 00:46
  • @David, it's duplicate of [Rename Azure Function](https://stackoverflow.com/questions/40656603/rename-an-azure-function) instead of a service plan. – Jerry Liu Apr 15 '18 at 03:20
  • Same thing really. Neither can be renamed. I don’t think I can undo a dupe-close though. – David Makogon Apr 15 '18 at 03:21
  • You are right. And I point out the question as there seems some workarounds in its answers. Apologize if I have made some mistakes. – Jerry Liu Apr 15 '18 at 03:52
  • @JerryLiu - I'm glad you linked to that other question. No mistakes made. The "can't rename resources" topic is fairly broad, in general, as they cover pretty much all services at the top level (e.g. created through management API). – David Makogon Apr 15 '18 at 15:02
  • 12
    This is not a duplicate question as indicated in the question or in any of the comments. 'App Service Plans' are not an 'App Service' nor is an 'Azure Function' an 'App Service' – David Sopko Feb 20 '20 at 17:11
  • 2
    Just because they have the same answer DOES NOT make them the same question. Part of SO is good answers but the other part is good questions whose answers change over time. This also makes this not a dupe given one thing might become renamable at some point in the future while the other does not. – David Nov 23 '20 at 16:55

2 Answers2

3

The easiest way is to create a new app service and then move the functions from the old app service to the one with the correct name.

Provided it's the same type of app service you can move functions between them freely.

Gavan O'B
  • 96
  • 6
1

As far as I know, it is by default not possible from the azure portal, but you can clone your existing app using a PowerShell script and give it a new name regarding Microsoft documentation. When you are confident, then you can delete your old one.

Another way I would suggest is using for instance terraform. When changing the app service in terraforms, it will automatically tear the old one and create a new one with the new name, with the same configuration.

Maytham Fahmi
  • 31,138
  • 14
  • 118
  • 137