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
# Automate resource deployment for your function app in Azure Functions
12
12
13
-
You can use a Bicep file or an Azure Resource Manager template to deploy a function app. This article outlines the required resources and parameters for doing so. You might need to deploy other resources, depending on the [triggers and bindings](functions-triggers-bindings.md) in your function app.
13
+
You can use a Bicep file or an Azure Resource Manager template to deploy a function app. This article outlines the required resources and parameters for doing so. You might need to deploy other resources, depending on the [triggers and bindings](functions-triggers-bindings.md) in your function app. For more information about creating Bicep files, see [Understand the structure and syntax of Bicep files](../azure-resource-manager/bicep/file.md). For more information about creating templates, see [Authoring Azure Resource Manager templates](../azure-resource-manager/templates/syntax.md).
14
14
15
-
# [Bicep](#tab/bicep)
16
-
17
-
For more information about creating Bicep files, see [Understand the structure and syntax of Bicep files](../azure-resource-manager/bicep/file.md).
18
-
19
-
# [JSON](#tab/json)
20
-
21
-
For more information about creating templates, see [Authoring Azure Resource Manager templates](../azure-resource-manager/templates/syntax.md).
22
-
23
-
---
24
-
25
-
For sample templates, see:
15
+
For sample Bicep files and ARM templates, see:
26
16
27
17
-[ARM templates for function app deployment](https://github.com/Azure-Samples/function-app-arm-templates)
28
18
-[Function app on Consumption plan]
@@ -103,7 +93,7 @@ These properties are specified in the `appSettings` collection in the `siteConfi
103
93
# [Bicep](#tab/bicep)
104
94
105
95
```bicep
106
-
resource site 'Microsoft.Web/sites@2022-03-01' = {
@@ -1408,7 +1398,7 @@ resource site 'Microsoft.Web/sites@2022-03-01' = {
1408
1398
1409
1399
Azure Functions can be deployed to [Azure Arc-enabled Kubernetes](../app-service/overview-arc-integration.md). This process largely follows [deploying to an App Service plan](#deploy-on-app-service-plan), with a few differences to note.
1410
1400
1411
-
To create the app and plan resources, you must have already [created an App Service Kubernetes environment](../app-service/manage-create-arc-environment.md) for an Azure Arc-enabled Kubernetes cluster. These examples assume you have the resource ID of the custom location and App Service Kubernetes environment that you're deploying to. For most templates, you can supply these values as parameters.
1401
+
To create the app and plan resources, you must have already [created an App Service Kubernetes environment](../app-service/manage-create-arc-environment.md) for an Azure Arc-enabled Kubernetes cluster. These examples assume you have the resource ID of the custom location and App Service Kubernetes environment that you're deploying to. For most Bicep files/ARM templates, you can supply these values as parameters.
1412
1402
1413
1403
# [Bicep](#tab/bicep)
1414
1404
@@ -1519,7 +1509,7 @@ The function app resource should have its `kind` field set to **functionapp,linu
1519
1509
# [Bicep](#tab/bicep)
1520
1510
1521
1511
```bicep
1522
-
resource site 'Microsoft.Web/sites@2022-03-01' = {
> This template uses the [Project](https://github.com/projectkudu/kudu/wiki/Customizing-deployments#using-app-settings-instead-of-a-deployment-file) app settings value, which sets the base directory in which the Functions deployment engine (Kudu) looks for deployable code. In our repository, our functions are in a subfolder of the **src** folder. So, in the preceding example, we set the app settings value to `src`. If your functions are in the root of your repository, or if you're not deploying from source control, you can remove this app settings value.
1717
+
> This Bicep/ARM template uses the [Project](https://github.com/projectkudu/kudu/wiki/Customizing-deployments#using-app-settings-instead-of-a-deployment-file) app settings value, which sets the base directory in which the Functions deployment engine (Kudu) looks for deployable code. In our repository, our functions are in a subfolder of the **src** folder. So, in the preceding example, we set the app settings value to `src`. If your functions are in the root of your repository, or if you're not deploying from source control, you can remove this app settings value.
1727
1718
1728
1719
## Deploy your template
1729
1720
1730
-
You can use any of the following ways to deploy your template:
1721
+
You can use any of the following ways to deploy your Bicep file and template:
> This method doesn't support deploying Bicep files currently.
1740
+
1739
1741
Replace ```<url-encoded-path-to-azuredeploy-json>``` with a [URL-encoded](https://www.bing.com/search?q=url+encode) version of the raw path of your `azuredeploy.json` file in GitHub.
1740
1742
1741
1743
Here's an example that uses markdown:
@@ -1752,7 +1754,9 @@ Here's an example that uses HTML:
1752
1754
1753
1755
### Deploy using PowerShell
1754
1756
1755
-
The following PowerShell commands create a resource group and deploy a template that creates a function app with its required resources. To run locally, you must have [Azure PowerShell](/powershell/azure/install-az-ps) installed. Run [`Connect-AzAccount`](/powershell/module/az.accounts/connect-azaccount) to sign in.
1757
+
The following PowerShell commands create a resource group and deploy a Bicep file/ARM template that creates a function app with its required resources. To run locally, you must have [Azure PowerShell](/powershell/azure/install-az-ps) installed. Run [`Connect-AzAccount`](/powershell/module/az.accounts/connect-azaccount) to sign in.
1758
+
1759
+
# [Bicep](#tab/bicep)
1756
1760
1757
1761
```powershell
1758
1762
# Register Resource Providers if they're not already registered
To test out this deployment, you can use a [template like this one](https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.web/function-app-create-dynamic/azuredeploy.json) that creates a function app on Windows in a Consumption plan. Replace `<function-app-name>` with a unique name for your function app.
1787
+
---
1788
+
1789
+
To test out this deployment, you can use a [template like this one](https://github.com/Azure/azure-quickstart-templates/tree/master/quickstarts/microsoft.web/function-app-create-dynamic) that creates a function app on Windows in a Consumption plan.
0 commit comments