ARM Template: Azure Webapp
Tags: azure, arm, devops, iac
Published: 2024-06-23 23:01:41

#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": {}
}
```

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t19jgkt00b7ppmrbbfu7.png)


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jpekvvvto6vsd72lcbp3.png)


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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gwzi3dywt9564cjkeksw.png)


**Step5:** Select the custom template 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e0xmhryd5ufqd6orq37b.png)

**Step6:** Paste the ARM Template code


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ydfjwvwskpl9kqveqlld.png)


**Step7:** Save the plan, review and create


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qaro1tc9q55w5jedaxfa.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pgey79ikf33oi2pwflrg.png)

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rk18iup5goi0h62z4ruy.png)


References :

1. [ARM App Service plan](https://learn.microsoft.com/en-us/azure/templates/microsoft.web/serverfarms?pivots=deployment-language-arm-template)
2. [ARM Web App](https://learn.microsoft.com/en-us/azure/templates/microsoft.web/sites?pivots=deployment-language-arm-template) 
3. [Understand the structure and syntax of ARM templates
](https://learn.microsoft.com/en-us/azure/azure-resource-manager/templates/syntax)

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](https://dev.to/srinivasuluparanduru) , [linkedin ](https://www.linkedin.com/in/srinivasuluparanduru)