Home > front end >  Azure ARM - Baseline resources with ARM template
Azure ARM - Baseline resources with ARM template

Time:02-01

I have created an ARM template for deploying resources into an Azure Resource Group. Is there any way I could use the same ARM template to perform automated "Baseline-Checks" in order to check if the resources have been changed in any way?

CodePudding user response:

  • You can perform baseline checks by using ARM template but you need to create individual template for each resource group in incremental mode and when there is any changes in the resource it will automatically updated in the template and by that way you can perform baseline checks

  • Here is the documentation which helps in creating ARM template.

CodePudding user response:

Are you just trying to determine if the state of the resources in Azure have "drifted" from the state declared in the template? If so you can use the what-if api and parse the results from that to see if something has changed.

https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-what-if?tabs=azure-powershell

If you want to prevent drift from occurring, you can lock the resources to prevent changes.

https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources?tabs=json

  •  Tags:  
  • Related