<ol>
<li>Bicep to create function app and define its configuration</li>
<li>To deploy, you may use Azure DevOps pipelines with Deploy Azure Function App task: <a href="https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-function-app-v2?view=azure-pipelines" rel="nofollow noreferrer">AzureFunctionApp@2 - Azure Functions Deploy v2 task</a></li>
</ol>

CC BY-SA 4.0
2024-02-02T13:37:31.647Z
2024-02-02T13:37:31.647Z
Shamrai Aleksander
<p>We have a deployment running in an azure devops server and base currently on az cli, now we want to go for bicep. I created bicep definitions for the resources what works easily. But now I got stuck when I try to deploy the azure function resource into that new resources. All ducumentation I found ends also at this point.
The function I want to deploy is developed in .Net 6 and is currently deployed via ZipDeployment.</p>
<p>At this point I ask myself whether bicep is perhaps not intended to transport the binaries into the resources. Instead, it is only intended to generate the resources and from this point on we are better off using our existing azure cli scripts.</p>
<p>I found the possibility to use <code>Microsoft.Web/sites/extensions@2021-02-01</code> with a <code>packageUri</code> but therefore the binaries need to be available online. So I would need to upload them first to a blob what is also not that simple in bicep and the way I found looks like an workaround including some security issues.</p>
<p>Is there someone who does this in pure bicep? If so, what is the best way to get the bianries deployed? Or is bicep only used to create the resources and the binaries are deployed into the resource in another way?</p>

<azure-devops><continuous-deployment>
Full deployment of Azure Function via bicep
Daniel W.
# Full deployment of Azure Function via bicep

(Asked by: username_0 on 2023-11-08)

We have a deployment running in an azure devops server and base currently on az cli, now we want to go for bicep. I created bicep definitions for the resources what works easily. But now I got stuck when I try to deploy the azure function resource into that new resources. All ducumentation I found ends also at this point.
The function I want to deploy is developed in .Net 6 and is currently deployed via ZipDeployment.

At this point I ask myself whether bicep is perhaps not intended to transport the binaries into the resources. Instead, it is only intended to generate the resources and from this point on we are better off using our existing azure cli scripts.

I found the possibility to use `Microsoft.Web/sites/extensions@2021-02-01` with a `packageUri` but therefore the binaries need to be available online. So I would need to upload them first to a blob what is also not that simple in bicep and the way I found looks like an workaround including some security issues.

Is there someone who does this in pure bicep? If so, what is the best way to get the bianries deployed? Or is bicep only used to create the resources and the binaries are deployed into the resource in another way?

**Tags:** azure-devops, continuous-deployment


---

## 1 answers

### Answer by username_1 on 2024-02-02. Score: 0

1. Bicep to create function app and define its configuration
2. To deploy, you may use Azure DevOps pipelines with Deploy Azure Function App task: [AzureFunctionApp@2 - Azure Functions Deploy v2 task](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/azure-function-app-v2?view=azure-pipelines)


---

