Hi,
I'm using a Blueprint to deploy an NSG and i'd like to enable diagnostic settings on creation. Trouble is, it looks like the blueprint is expecting the diagnostic setting to exist, so it can append the log types instead of creating an entirely new diagnostic setting, at least, this is what the error thrown when the blueprint is assigned suggests:
No HTTP resource was found that matches the request URI 'https://uksouth.network.azure.com:30066/e7b2f0dc-f08d-48ee-9bd9-bef034130152/132271074871408129/subscriptions/<sub_id>/resourcegroups/blueprint-vnet/providers/Microsoft.Network/networksecuritygroups/NG-UKS-DEV-P-002/providers/microsoft.insights/diagnosticSetting/nsg-diagnostics?api-version=2019-12-01'.
Syntactically it looks correct, based on the documentation (https://docs.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-settings-template) but examples are a little light. Has anyone in the community been able to create the diagnostic settings at creation time using ARM, or is the consensus to do this post-deployment using powershell (or similar)?