You need to create a new Azure Function App on an Elastic Premium plan using the Azure CLI. Which sequence of commands should you execute? To answer, arrange the steps in the correct order.
- 1az group create --name myResourceGroup --location eastus
- 2az storage account create --name mystorageaccount --location eastus --resource-group myResourceGroup --sku Standard_LRS
- 3az appservice plan create --name myPremiumPlan --resource-group myResourceGroup --sku EP1 --is-linux
- 4az functionapp create --name myFunctionApp --resource-group myResourceGroup --storage-account mystorageaccount --plan myPremiumPlan --runtime dotnet-isolated --functions-version 4
Answer
The correct order of commands is to first create the resource group, then create the storage account, followed by creating the Elastic Premium App Service plan, and finally creating the Function App.
The resource group must exist first. Then, the storage account and the App Service plan are created as they have no mutual dependencies but both require the resource group. Finally, the function app is created because it depends on the resource group, the storage account, and the App Service plan.
Step-by-Step Solution
Key Concept
Azure Functions resources have creation dependencies: a resource group must exist first, followed by storage and hosting plan resources, before the function app itself can be initialized.