You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/app-service/provision-resource-bicep.md
+79Lines changed: 79 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ ms.author: msangapu
6
6
ms.topic: article
7
7
ms.custom: devx-track-bicep
8
8
ms.date: 11/18/2022
9
+
zone_pivot_groups: app-service-bicep
9
10
---
10
11
11
12
# Create App Service app using Bicep
@@ -22,6 +23,8 @@ To effectively create resources with Bicep, you'll need to set up a Bicep [devel
22
23
23
24
## Review the template
24
25
26
+
::: zone pivot="app-service-bicep-linux"
27
+
25
28
The template used in this quickstart is shown below. It deploys an App Service plan and an App Service app on Linux and a sample Node.js "Hello World" app from the [Azure Samples](https://github.com/Azure-Samples) repo.
26
29
27
30
```bicep
@@ -113,6 +116,82 @@ To deploy a different language stack, update `linuxFxVersion` with appropriate v
113
116
114
117
---
115
118
119
+
::: zone-end
120
+
121
+
::: zone pivot="app-service-bicep-windows-container"
122
+
123
+
The template used in this quickstart is shown below. It deploys an App Service plan and an App Service app on Windows and a sample .NET "Hello World" app from the [Azure Samples](https://github.com/Azure-Samples) repo.
124
+
125
+
```bicep
126
+
param webAppName string = uniqueString(resourceGroup().id) // generate unique name for web app
127
+
param location string = resourceGroup().location // location for all resources
128
+
param sku string = 'P1V3' // The SKU of App Service Plan
Copy and paste the template to your preferred editor/IDE and save the file to your local working directory.
181
+
182
+
Azure CLI is used here to deploy the template. You can also use the Azure portal, Azure PowerShell, and REST API. To learn other deployment methods, see [Bicep Deployment Commands](../azure-resource-manager/bicep/deploy-cli.md).
183
+
184
+
The following code creates a resource group, an App Service plan, and a web app. A default resource group, App Service plan, and location have been set for you. Replace `<app-name>` with a globally unique app name (valid characters are `a-z`, `0-9`, and `-`).
185
+
186
+
Open up a terminal where the Azure CLI is installed and run the code below to create a .NET app.
187
+
188
+
```azurecli-interactive
189
+
az group create --name myResourceGroup --location "southcentralus" &&
190
+
az deployment group create --resource-group myResourceGroup --template-file <path-to-template>
191
+
```
192
+
193
+
::: zone-end
194
+
116
195
## Validate the deployment
117
196
118
197
Browse to `http://<app_name>.azurewebsites.net/` and verify it's been created.
0 commit comments