I am trying to add diagnostic settings to my ARM template for SQL Managed Instances and I get the following error:
{ "id": "/subscriptions/252a17df-68c3-41f6-9fe3-eccbe29dc485/resourceGroups/perf-test-vans-integration-rg/providers/Microsoft.Resources/deployments/sql-mi-template/operations/FE1BC7249F09E459", "operationId": "FE1BC7249F09E459", "properties": { "provisioningOperation": "Create", "provisioningState": "Failed", "timestamp": "2019-09-10T09:03:34.1749191Z", "duration": "PT4.3390448S", "trackingId": "63bf7ee4-63e2-4029-9ced-26b564d721ef", "statusCode": "NotFound", "statusMessage": { "code": "OperationNotFound", "message": "This path doesn't exist." }, "targetResource": { "id": "/subscriptions/252a17df-68c3-41f6-9fe3-eccbe29dc485/resourceGroups/perf-test-vans-integration-rg/providers/Microsoft.Sql/managedInstances/LandingInstance/providers/Microsoft.Insights/diagnosticSettings/Logs to sumo SQL-MI Audit", "resourceType": "Microsoft.Sql/managedInstances/providers/diagnosticSettings", "resourceName": "LandingInstance/Microsoft.Insights/Logs to sumo SQL-MI Audit" } }}
I have tested deploying the diagnostic setting with various names and it seems the diagnostic setting only seems to work when the diagnostic setting name is service. It comes up with an error with anby other name that I try to use with the diagnostic name.
My ARM template for the same is as follows:
--
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@AakashMasand Thanks for reaching out to us! To better assist you, could you please share the Azure document link / URL for which this feedback is applicable to.
Hi @KrishnaG-MSFT,
The document I am referring to is https://docs.microsoft.com/en-us/azure/azure-monitor/platform/diagnostic-logs-stream-template.
@AakashMasand Thanks for the quick response. We are actively investigating on the issue and will get back to you shortly with an update.
We recommend engaging our technical support team to investigate further.Please file a support case using these steps. If you do not have a support plan, send mail to [email protected] , include your subscription ID and a link to this GitHub thread (for context).
We will close the issue here. If there are further questions regarding this matter, please respond, we will gladly continue the discussion
@AakashMasand did you ever get this resolved? I have the exact same issue.
@rwiankowski I had the same error trying to add diagnostic settings to an applicationgateway. Checked the microsoft docs for microsoft.insights and found "diagnosticSettings" is only referenced in api version "2017-05-01-preview". This matches this example.
Works fine for me with the correct api version.