Hi Stan,
Thank you for your suggestion.
I don't seem to be able to find for a way to automate the deployIfNotExists remediation.
Do you know if that is possible?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello experts,
I would like for some guidance regarding the best ways to automate actions on newly created virtual machines.
What I would like to do is to develop someway to automate the creation of managed system identities, install certain extensions, or enabling diagnostic settings as soon as a new VM is created.
My initial thought was to use log analytics to create an alert that runs every 5 minutes and queries for newly created VMs, then use an automation runbook as the action group, to run a piece of powershell code to enable the desired features.
Would anyone suggest a better approach to accomplish my requirement?
Hi Stan,
Thank you for your suggestion.
I don't seem to be able to find for a way to automate the deployIfNotExists remediation.
Do you know if that is possible?
The best way to automate this is to use Azure Policy. With deployIfNotExists effect you can deploy some resources when certain things do not exits (not compliant). I would still recommend if you are deploying these resources trough some automation like CI/CD and ARM Templates is to deploy these additional settings along with the actual deployment of resources.