Microsoft Azure – Create App Service Plan for Windows Service using CLI
Pre-requisite:- Azure
An App Service Plan is a subscription model for hosting apps on Azure. It allows you to host multiple apps on a single server without paying for each app separately. This article will show you how to deploy an Azure App Service Plan with Windows service type using Azure CLI (Command Line Interface) from Azure Portal using Cloud Shell in simple, easy steps.
Prerequisites: Contributor Access on Subscription is required to create a resource group and app service plan
Steps to Create a Service Plan using CLI
Step 1: Log in to Azure Portal
Step 2: Open Azure Cloud Shell and switch to PowerShell/Bash console to run the Azure CLI Commands
Step 3: Create a New Resource Group using the CLI command.
Run the below following command to create a resource group in azure
az group create \ --location "<add location>" \ --name "<Add Resource Group Name>"
Example:
az group create --location "eastus" --name "Test-RG"
OR
az group create \ --location "eastus" \ --name "Test-RG"

Step 4:- Next create a Windows App Service Plan
Run the below following command to create Windows App Service Plan
az appservice plan create \ -g "<Add Existing Resource Group Name>" \ -n "<Add App Plan Name>" \ --hyper-v --number-of-workers <Add number of Workers> \ --sku <Add SKU>
Example
az appservice plan create -g "Test-RG" -n "LinuxAppServicePlan" --hyper-v --number-of-workers 1 --sku F1
OR
az appservice plan create \ -g "Test-RG" \ -n "WindowsAppServicePlan" \ --hyper-v \ --number-of-workers 1 \ --sku F1

Once created verify the deployment in Azure Portal by Accessing App Service Plans. If your deployment is successful! that means you are done. Now you can use this app service for hosting the services.
Please Login to comment...