How to schedule deploying an ARM template? - azure

I have an ARM template which I can run as a custom deployment in the Azure portal. How do I get this to run automatically on a schedule? I'm guessing I can do it with an automation account, but I did not find anything in there about deploying ARM templates.

You have two (2) options:
Logic App
Runbook Automation
There is a post that shows how to implement this using either solutions.

Related

Is it possible to automate Azure 'run as' account creation using ARM templates?

Currently I'm deploying automation accounts using ARM templates but then I have to manually create 'Run as accounts'. Is there any way to automate this process?
Currently We do not have an option to create the Run As accounts using ARM template.
There is already a feature request on this : Creation of Run As accounts using ARM Template

Enable Continuous Deployment on Linux Container-based function app using ARM Template in Azure

I have a Linux Container-Based function app that I am deploying from an ARM template, I have found that I can enable "Continuous Deployment" via the Portal (screenshot below), but can't automate it with an ARM Template.
It would be really nice if we could automatically enable Continuous Deployment via the ARM template (or perhaps even enable it by default). Is there any way to do this?
I think you're right. It's not a property for Azure Web App, it's a trigger for the action event of the image registry. From the creation steps, you can find the webhook is created in the ACR or Docker hub which the web image in. The continuous deployment just provides a URL for the webhook. So you cannot set the Continuous Deployment in the ARM template in Azure.

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 the specific changes of ARM template code into specific azure resources?

I am working on Azure ARM templates. I created the ARM templates for azure web app and azure SQL database, for that I configured the Continuous Integration and Continuous Deployment successfully without any issues.
After one month, I added the one more application settings for web app and added the new firewall rule for azure SQL database and check in the code into VSTS it’ automatically triggered the build and then release.
After every release the ARM template code deployed into azure resources. So, that’s why azure resources recreated once again. But I want to deploy only the changes of ARM template of azure web app and SQL database etc….
I have few doubts in this
I created the azure resources using ARM templates through the CI & CD process from VSTS. After that I deployed the application code into azure web app, after few days I added the some code in web app ARM template and deployed it into azure. After redeployed the ARM templates once again then the application code is also gone. For that what can I follow the better approach?
How to deploy the specific changes of ARM templates code in to azure, once I deployed the primary ARM template first.
You need to make sure the code is also being deployed with the ARM Template, because it adjusts the configuration to what is defined in the template. whats why you see such a behavior.
Just edit the template and redeploy into the same resource group. that's what they are for.

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