0
votes

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

  1. 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?
  2. How to deploy the specific changes of ARM templates code in to azure, once I deployed the primary ARM template first.
1
Normally ARM Template will perform an add/update resources and wont touch thing that haven't changed. Creating my release pipeline, I first deploy the ARM template and then deploy the web app and the sql database. I am not really sure about why your code is gone ... sounds weirdThomas
By default, ARM Template deployment is incremental : docs.microsoft.com/en-us/azure/azure-resource-manager/…Thomas
Can you share the detail logs of these build/release, we will compare them. (Set system.debug variable to true)starian chen-MSFT
Do you solve this issue? If not, can you share detail log?starian chen-MSFT
Is CI/CD set up to do Incremental changes to the Resource Group deployment or delete and recreate? Incremental should just apply the deltas.DreadedFrost

1 Answers

1
votes
  1. 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.
  2. Just edit the template and redeploy into the same resource group. that's what they are for.