Souciance Eqdam Rashti
Souciance Eqdam Rashti

Reputation: 3191

Deploy azure functions across resource groups

I have looked at the Azure functions documentation but couldn't quit find answer to my question and hence I thought I asked the wider user community.

We have a single Azure subscription with multiple resource groups for our different environments, so one group for dev, one for test and one for prod.

We have developed multiple Azure functions in dev and would like to use CI/CD to deploy to test and prod.

However, doing this manually Azure complains that the name of the function app already exists which is weird because that would imply that the function app name must be unique to the subscription or globally across Azure? Does that mean you need to name your function apps func-dev, func-test etc? That seems very ugly.

How have you managed to solve this?

Upvotes: 0

Views: 1137

Answers (2)

Mikhail Shilkov
Mikhail Shilkov

Reputation: 35144

Function App, as any App Service application, has to have globally unique name:

Indeed, it's typical to include your environment into the App name.

Function names have to be unique within a single Function App, but may repeat in different apps.

Upvotes: 1

4c74356b41
4c74356b41

Reputation: 72181

azure function name has to be globally unique (not just in your subscription), because the name would be like:

functionName.azurewebsites.net

so you cannot have a function with name functionName if you already created one, because the dns name for that is occupied.

you can use subfunctions to work around that, so create a subfunction called dev, test, and prod inside the function and call those

Upvotes: 2

Related Questions