Skip to content

Commit

Permalink
Merge pull request #423 from recognizegroup/hotfix/LUC-4177
Browse files Browse the repository at this point in the history
LUC-4177 - Fix bug introduced in #417
  • Loading branch information
tom-reinders authored Jul 16, 2024
2 parents d6c36a6 + 647f057 commit 1f3ad4d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions modules/azure/storage_account_public/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,27 @@ resource "azurerm_storage_management_policy" "storage_management_policy" {
}

data "azurerm_monitor_diagnostic_categories" "blob" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.blob == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.blob == null ? 0 : 1 : 0
resource_id = "${azurerm_storage_account.storage_account.id}/blobServices/default/"
}

data "azurerm_monitor_diagnostic_categories" "queue" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.queue == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.queue == null ? 0 : 1 : 0
resource_id = "${azurerm_storage_account.storage_account.id}/queueServices/default/"
}

data "azurerm_monitor_diagnostic_categories" "table" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.table == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.table == null ? 0 : 1 : 0
resource_id = "${azurerm_storage_account.storage_account.id}/tableServices/default/"
}

data "azurerm_monitor_diagnostic_categories" "file" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.file == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.file == null ? 0 : 1 : 0
resource_id = "${azurerm_storage_account.storage_account.id}/fileServices/default/"
}

resource "azurerm_monitor_diagnostic_setting" "blob" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.blob == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.blob == null ? 0 : 1 : 0
name = "diag-blob-${var.name}"
target_resource_id = "${azurerm_storage_account.storage_account.id}/blobServices/default/"
log_analytics_workspace_id = var.loganalytics_diagnostic_setting.workspace_id
Expand All @@ -162,7 +162,7 @@ resource "azurerm_monitor_diagnostic_setting" "blob" {
}

resource "azurerm_monitor_diagnostic_setting" "queue" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.queue == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.queue == null ? 0 : 1 : 0
name = "diag-queue-${var.name}"
target_resource_id = "${azurerm_storage_account.storage_account.id}/queueServices/default/"
log_analytics_workspace_id = var.loganalytics_diagnostic_setting.workspace_id
Expand All @@ -186,7 +186,7 @@ resource "azurerm_monitor_diagnostic_setting" "queue" {
}

resource "azurerm_monitor_diagnostic_setting" "table" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.table == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.table == null ? 0 : 1 : 0
name = "diag-table-${var.name}"
target_resource_id = "${azurerm_storage_account.storage_account.id}/tableServices/default/"
log_analytics_workspace_id = var.loganalytics_diagnostic_setting.workspace_id
Expand All @@ -210,7 +210,7 @@ resource "azurerm_monitor_diagnostic_setting" "table" {
}

resource "azurerm_monitor_diagnostic_setting" "file" {
count = var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.table == null ? 0 : 1
count = var.loganalytics_diagnostic_setting != null ? var.loganalytics_diagnostic_setting.workspace_id == null || var.loganalytics_diagnostic_setting.table == null ? 0 : 1 : 0
name = "diag-file-${var.name}"
target_resource_id = "${azurerm_storage_account.storage_account.id}/fileServices/default/"
log_analytics_workspace_id = var.loganalytics_diagnostic_setting.workspace_id
Expand Down

0 comments on commit 1f3ad4d

Please sign in to comment.