Azure-rest-api-specs: Diagnostic Settings Create API Has Inconsistent Behavior On `logAnalyticsDestinationType` for Certain Resource

Created on 30 Apr 2020  路  5Comments  路  Source: Azure/azure-rest-api-specs

The field logAnalyticsDestinationType in the diagnostic setting Creation API is not consistent and have skew for certain resources.

  1. For some certain resource (e.g. azure app service), if the user calls diagnostic settings with logAnalyticsDestinationType set to Dedicated, the API returns successful, but the body of a following GET returns that field with null. Is it possible to raise an error if the resource doesn't support the specified destination type?
  2. For some other resource (e.g. azure API management), if the user calls diagnostic settings with logAnalyticsDestinationType absent, the API returns successful, but the body of a following GET returns that field with AzureDiagnostics, which is not documented. Is it possible to return nil as documented?

Reference

  • terraform-providers/terraform-provider-azurerm#6676.
App Services Service Attention

Most helpful comment

@ArcturusZhang ping on this one?

All 5 comments

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @antcp, @AzureAppServiceCLI.

Any progress on this here?

In my terraform state is always stored empty string of logAnalyticsDestinationType = "" for resource type azurerm_monitor_diagnostic_setting. It results in the change on terraform plan each time it is run.

using terraform 0.12.29
azurerm provider ">= 2.22.0"

related problems/issues:

https://github.com/terraform-providers/terraform-provider-azurerm/pull/6769
https://github.com/terraform-providers/terraform-provider-azurerm/issues/6676

@ArcturusZhang ping on this one?

This issue will need service team's attention to resolve.
Ping @antcp, @AzureAppServiceCLI

Was this page helpful?
0 / 5 - 0 ratings