Deploying Azure Function Swagger API Definition using ARM - azure

We are creating an ARM template for our Azure Function that we would like to use for deploying to different environments however we cannot figure out how to deploy the Swagger with it.
As far as we see in the ARM template there is an option to add a link to the Swagger but can the Swagger be deployed as part of the ARM template itself?

Related

APIM ARM template creation

I have an APIM instance and API's working on it. I want to create ARM template for deployment but can't understand how to do it. I only have the Azure portal repository for it and don't want to create a VSO repository. I am new to ARM templates, so don't have much information.
You can put all your code like the arm templates or swagger files wherever you want, GitHub, Azure DevOps, locally only ... and then deploy your api using Api-M's REST interface (https://learn.microsoft.com/en-us/rest/api/apimanagement/api/createorupdate), the PowerShell AzureRm or Az module https://learn.microsoft.com/en-us/powershell/module/azurerm.apimanagement/import-azurermapimanagementapi?view=azurermps-6.13.0 or by deploying an arm template.
When it comes to creating arm templates you may take a look here:
https://github.com/Azure/azure-quickstart-templates/blob/master/101-azure-api-management-create/azuredeploy.json
Anyway, we first started with arm templates as well and found later out that it's easier to use the REST interface or the PowerShell module by deploying a swagger file and the policies.

How to deploy azure function app code along with ARM template in VSTS

Want to know how to specify the artifact ( generated after Build process in VSTS) in ARM template so that i can deploy the function app code along with ARM template.
you can upload it to the azure storage blob and use msdeploy extension\resource to configure the webapp.
https://github.com/davidebbo/AzureWebsitesSamples/blob/644511d40f379ba4f1ba5ec224d5de29207b6181/ARMTemplates/WordpressTemplateWebDeployDependency.json#L58-L80

How to deploy Azure Function app including code using ARM template from Azure marketplace

I want to deploy a Function App including code using an ARM template that is going to be published in the Azure Marketplace as a Managed App.
I've seen in the docs that you can add a sourcecontrols element in the ARM template that you can use to point to e.g. a GitHub repository. However, I don't want to use a repository, I want to code to be uploaded to the Function App.
I also know you can upload the code using the Azure CLI or powershell, however this will not be possible when publishing the app in the marketplace.
Is there a way to have a package that contains everything including the code and have that uploaded to the Function App all using an ARM template in the Azure Marketplace?
You should take a look at Run-From-Zip. Basically, you host the zip package somewhere (typically storage blob), and in ARM template you just set a WEBSITE_RUN_FROM_ZIP App Setting pointing to it.
As an alternative, you could use the ARM msdeploy extension, and point it to the zip package (e.g. something like this).

Is it possible to configure custom config section in ARM template

I have created a custom configuration section for a service that is to be deployed to Azure in an app service. I know how to add app settings to the app service configuration. However, I can't find information about how to handle custom configuration sections. Is this something that is supported in Azure ARM templates?
There is no way to override custom section via the Azure App Service ARM API. Instead, this is something you do by simply deploying the right web.config file to your Web App.
via ARM template NO.
where as one cam make use of FTP and add the required changes on post Deploy or make all the required changes on pre deploy. :)

Is there a way to deploy a VSTS project in an app service using an ARM template?

I'm creating resources on Azure using an ARM template. I have three web apps to deploy. Normally i can deploy them separately using VSTS which is slow. So is there a way to deploy a project on VSTS using an ARM template?
You can deploy a template that uses web deploy to also deploy a web app - you can deploy to slots or deploy to an existing web app (not defined in your ARM template). This sample has an MSDeploy extension that does the work.
https://github.com/Azure/azure-quickstart-templates/tree/master/201-web-app-blob-connection
You can also go this route:
https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-get-started/
Both can be done via VSTS...
You would need to export ARM template from your azure RM portal.
Make sure
you have single resource group where all these apps have been deployed (since you want to deploy them together).
Export the resource management template and attach to your VSTS project as resource.
Add a new release task in your VSTS as Azure Resource Group Deployment.
Add connection details to your resource group.
Specify the previously exported template
Configure the parameters (or use variables).
you should be able to use VSTS build and release management to deploy ARM resources.

Resources