DEV Community

Srinivasulu Paranduru for cloudteachable

Posted on • Edited on

ARM Template: Azure Webapp

Creation of Azure Webapp using ARM Templates

Step1: ARM Template for creating Azure Webapp

{
    "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {},
    "functions": [],
    "variables": {},
    "resources": [
        {
            "type": "Microsoft.Web/serverfarms",
            "apiVersion": "2022-09-01",
            "name": "plansrinivas2024",
            "location": "[resourceGroup().location]",
            "sku":{
                "name" :"F1",
                "capacity":1
            },
            "properties": {
                "name" : "plansrinivas2024"
            }
        },
        {
            "type": "Microsoft.Web/sites",
            "apiVersion": "2022-09-01",
            "name": "newappsrinivas2024",
            "location": "[resourceGroup().location]",
            "properties": {
                "name" : "newappsrinivas2024",
                "serverFarmId" : "[resourceId('Microsoft.Web/serverfarms','plansrinivas2024')]"
            },
            "dependsOn": [
                "[resourceId('Microsoft.Web/serverfarms','plansrinivas2024')]"
            ]
        }
    ],
    "outputs": {}
}
Enter fullscreen mode Exit fullscreen mode

Step2:Go to portal.azure.com and create a new resource group as arm-template1

Image description

Step3:Search with template deployment in azure portal and select the option highlighted in the picture

Image description

Step4: Select the resource group created earlier then review and create

Image description

Step5: Select the custom template

Image description

Step6: Paste the ARM Template code

Image description

Step7: Save the plan, review and create

Image description

Step8: Go the resource group arm-template1 selected for the arm template

Image description

Step9: Delete the resource group: arm-template1 created for this exercise for avoiding expenses

Image description

References :

  1. ARM App Service plan
  2. ARM Web App
  3. Understand the structure and syntax of ARM templates

Conclusion : Created a Azure webapp using ARM Template

πŸ’¬ If you enjoyed reading this blog post and found it informative, please take a moment to share your thoughts by leaving a review and liking it πŸ˜€ and follow me in dev.to , linkedin

Top comments (0)