I am trying to create blob storage under Storage account which is created fine, but when i am trying to create diagnostic setting for same. It shows storage account as “disabled” and blob container as “Enabled. I want both of these two be enabled. Please suggest.
resource "azurerm_monitor_diagnostic_setting" "core-diagnostic" {
name = "readwrite${random_string.random.result}"
target_resource_id = "${azurerm_storage_account.core.id}/blobServices/default/"
log_analytics_workspace_id = azurerm_log_analytics_workspace.core.id
log {
category = "StorageRead"
enabled = true
}
log {
category = "StorageWrite"
enabled = true
}
metric {
category = "Transaction"
enabled = true
retention_policy {
days = 5
enabled = true
}
}
}