Deploy Network Watcher when a VM is created

Heman 1 Reputation point
2021-08-18T03:13:15.303+00:00

Hello
I'm trying to Deploy Network Watcher when a VM is created. Please note that I'm trying to do it automatically (as soon as the VM is created).
I tried using Azure Policy but I'm not able to, probably because I need a custom policy, but I will need some help with the code.

Any ideas or suggestions are welcome. Thanks

Azure Network Watcher
Azure Network Watcher
An Azure service that is used to monitor, diagnose, and gain insights into network performance and health.
159 questions
Azure Policy
Azure Policy
An Azure service that is used to implement corporate governance and standards at scale for Azure resources.
797 questions
{count} votes

1 answer

Sort by: Most helpful
  1. tbgangav-MSFT 10,386 Reputation points
    2021-08-18T14:04:54.007+00:00

    Hi @Heman ,

    I could find this built-in policy which helps to deploy network watcher when virtual networks are created. I believe you may re-use this policy to create a custom policy by changing virtual network resource type in policyRule section to virtual machine resource type and see if it works.

    Other related references:

    0 comments No comments