Azure / bicep

Bicep is a declarative language for describing and deploying Azure resources
MIT License
3.25k stars 754 forks source link

Disable Azure Storage Analytics diagnostics with Bicep #10880

Closed vienleidl closed 1 month ago

vienleidl commented 1 year ago

Is your feature request related to a problem? Please describe. Diagnostics are enabled by default on new storage accounts created from the Azure portal, PowerShell and Azure Bicep. In the diagnostic settings (classic) blade, hour metrics are always enabled for blob, file, table & queue services.

Describe the solution you'd like It would be better if we can turn diagnostics on or off by using Azure Bicep.

alex-frankel commented 1 year ago

I'm not sure I understand the ask. Are you saying this is not possible via bicep today? If so, I'd recommend opening a support case (and we will move this issue to the azure/bicep-types-az repo).

vienleidl commented 1 year ago

I'm not sure I understand the ask. Are you saying this is not possible via bicep today? If so, I'd recommend opening a support case (and we will move this issue to the azure/bicep-types-az repo).

Yes. It's not possible to turn off the diagnostic settings (classic) of a Storage Account via Bicep as of now.

jikuja commented 1 year ago

Only hourly metrics are enabled by default and classic storage metrics is going to be retired soon:

On August 31, 2023 Storage Analytics metrics, also referred to as classic metrics will be retired.


It's not possible to turn off the diagnostic settings (classic) of a Storage Account via Bicep as of now.

True. AFAIK Classic storage diagnostics are on storage account data layer only: https://learn.microsoft.com/en-us/rest/api/storageservices/enabling-and-configuring-storage-analytics.

vienleidl commented 1 month ago

I've open another one https://github.com/Azure/bicep-types-az/issues/2321