terraform-azurerm-caf icon indicating copy to clipboard operation
terraform-azurerm-caf copied to clipboard

Support Storage Account services diagnostic settings

Open trapeznikov opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Community Note

  • Please vote on this issue by adding a :thumbsup: reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently only Storage Account diagnostic settings are supported. We need to be able to add diagnostic settings for Storage Account services such as Blob, Queue, Table, and Files

Here's a discussion how it's done with terraform resources: https://docs.microsoft.com/en-us/answers/questions/765022/getting-34sub-34diagnostic-settings-for-azure-stor.html

New or Affected Resource(s

azurerm_storage_account, azurerm_monitor_diagnostic_setting

Potential Configuration file

module "diagnostics_blob" {
  source = "../diagnostics"
  count  = var.diagnostic_profiles_blob == {} ? 0 : 1

  resource_id       = "${azurerm_storage_account.stg.id}/blobServices/default/"
  resource_location = azurerm_storage_account.stg.location
  diagnostics       = var.diagnostics
  profiles          = try(var.diagnostic_profiles_blob, {})
}

References

No response

trapeznikov avatar Aug 11 '22 14:08 trapeznikov