question

PeterWu-5164 avatar image
0 Votes"
PeterWu-5164 asked ·

boot diagnostics policy enable by default and remediate with enabling if not enabled

How to enable boot diagnostics to troubleshoot virtual machines through policy and remediate with enabling if not enabled? I know there is the documentation to enable boot diagnostics: https://docs.microsoft.com/en-us/azure/virtual-machines/troubleshooting/boot-diagnostics but how can we enforce this feature by default?

azure-virtual-machines
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

bryanhaslip avatar image
1 Vote"
bryanhaslip answered ·

This is done through Azure policy. Please leverage this built in policy and target Microsoft.Compute virtualMachines. You will create a deployIfNotExists as a part of the policy definition. If not the default will audit and enforce for new resources.

https://github.com/krnese/azure-policy-samples/tree/master/samples/Monitoring/audit-diagnostic-setting

· Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.