Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions infrastructure/modules/storage/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,14 @@ module "diagnostic-settings" {
enabled_metric = var.monitor_diagnostic_setting_storage_account_metrics

}

module "diagnostic-settings-sa-resource" {

source = "../diagnostic-settings"

name = "${azurerm_storage_account.storage_account.name}-diagnotic-setting-storage-account"
target_resource_id = "${azurerm_storage_account.storage_account.id}"
log_analytics_workspace_id = var.log_analytics_workspace_id
enabled_metric = var.monitor_diagnostic_setting_storage_account_resource_metrics

}
10 changes: 8 additions & 2 deletions infrastructure/modules/storage/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,18 @@ variable "log_analytics_workspace_id" {

variable "monitor_diagnostic_setting_storage_account_enabled_logs" {
type = list(string)
description = "Controls what logs will be enabled for the storage"
description = "Controls what logs will be enabled for the storage services"
}

variable "monitor_diagnostic_setting_storage_account_metrics" {
type = list(string)
description = "Controls what metrics will be enabled for the storage"
description = "Controls what metrics will be enabled for the storage services"
}

variable "monitor_diagnostic_setting_storage_account_resource_metrics" {
type = list(string)
description = "Controls what metrics will be enabled for the storage account itself"
default = ["Transaction"]
}

variable "private_endpoint_properties" {
Expand Down