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/static-web-apps/publish-bicep.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
---
2
2
title: 'Deploy Azure Static Web Apps with Bicep'
3
-
description: Deploy Azure Static Web Apps using Bicep including resource creation and configuration. Link your own Azure Function to support your static web app.
3
+
description: Deploy Azure Static Web Apps using Bicep including resource creation and configuration. Link your own Azure Functions app to support your static web app.
4
4
services: static-web-apps
5
-
ms.custom:
6
5
author: craigshoemaker
7
6
ms.service: azure-static-web-apps
8
7
ms.topic: how-to
@@ -13,20 +12,20 @@ ms.author: cshoe
13
12
14
13
# Deploy Azure Static Web Apps with Bicep
15
14
16
-
Use a bicep file to create your Azure Static Web app to Azure. Bicep is a domain-specific language (DSL) that uses declarative syntax to define and create Azure resources repeatedly in a consistent manner.
15
+
Use a Bicep file to create your Azure Static Web app to Azure. Bicep is a domain-specific language (DSL) that uses declarative syntax to define and create Azure resources repeatedly in a consistent manner.
17
16
18
17
To deploy your static web app, you need to:
19
18
* Create resources with Bicep
20
19
* Deploy your source code. Use one of the following tools to deploy your app:
The bicep examples in this article use [Azure Verified Modules (AVM)](https://azure.github.io/Azure-Verified-Modules/) when possible and [bicep](/azure/azure-resource-manager/bicep/) when AVM isn't available. You'll be able to recognize AVM because the referenced module includes `avm/res` such as `br/public:avm/res/web/static-site:0.3.0`.
26
+
The Bicep examples in this article use [Azure Verified Modules (AVM)](https://azure.github.io/Azure-Verified-Modules/) when possible and [Bicep](/azure/azure-resource-manager/Bicep/) when AVM isn't available. You'll be able to recognize AVM because the referenced module includes `avm/res` such as `br/public:avm/res/web/static-site:0.3.0`.
AVM allows you to adopt bicep code, which has been built and is maintained by professional engineers fluent in bicep. These modules aren't only supported and maintained, they're opinionated about what proper bicep files look like.
41
+
AVM allows you to adopt Bicep code, which has been built and is maintained by professional engineers fluent in Bicep. These modules aren't only supported and maintained, they're opinionated about what proper Bicep files look like.
- Optional, [Visual Studio Code extension for Bicep](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-bicep). This extension is used to immediately run your bicep file, which creates your resources.
- Optional, [Visual Studio Code extension for Bicep](https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-Bicep). This extension is used to immediately run your Bicep file, which creates your resources.
48
47
49
48
## Create a static web app resource
50
49
51
-
Create a `main.bicep` file with the bicep code below to:
50
+
Create a `main.Bicep` file with the Bicep code below to:
52
51
53
52
* Create a unique string, `resourceToken`.
54
53
* Create tags for the resources. Tags are filterable in the Azure portal.
55
54
* Create a unique resource group.
56
55
* Create a Static web app.
57
56
58
-
```bicep
57
+
```Bicep
59
58
targetScope = 'subscription'
60
59
61
60
@description('The name of the Azure region that will be used for the deployment.')
@@ -99,13 +98,13 @@ Save the values of the output variables. You'll need these to configure the reso
99
98
100
99
To create a static web app with a linked backend function app, you need to use a standard plan for your static web app and complete the following steps.
101
100
102
-
*[Create the Azure Function app](/azure/azure-functions/functions-create-first-function-bicep). You need the `resourceId` for the Function app, which looks like: `/subscriptions/<SUBSCRIPTION-ID>/resourcegroups/<RESOURCE-GROUP-NAME>/providers/Microsoft.Web/sites/<FUNCTION-APP-NAME>`.
103
-
* Create the static web app using the [bicep in the previous section](#create-a-static-web-app-resource).
101
+
*[Create the Azure Function app](/azure/azure-functions/functions-create-first-function-Bicep). You need the `resourceId` for the Function app, which looks like: `/subscriptions/<SUBSCRIPTION-ID>/resourcegroups/<RESOURCE-GROUP-NAME>/providers/Microsoft.Web/sites/<FUNCTION-APP-NAME>`.
102
+
* Create the static web app using the [Bicep in the previous section](#create-a-static-web-app-resource).
104
103
* Link the static web app to the function app.
105
104
106
-
Create a `config.bicep` file to link the static web app to the function app.
105
+
Create a `config.Bicep` file to link the static web app to the function app.
107
106
108
-
```bicep
107
+
```Bicep
109
108
targetScope = 'resourceGroup'
110
109
111
110
@description('The name of the Azure region that will be used for the deployment.')
0 commit comments