Skip to content

Commit

Permalink
unique diagnostic settings names (#82)
Browse files Browse the repository at this point in the history
Co-authored-by: Glenn Musa <[email protected]>
  • Loading branch information
glennmusa and glennmusa authored Mar 18, 2021
1 parent ce17867 commit cd5d2aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/modules/firewall/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ locals {
}

resource "azurerm_monitor_diagnostic_setting" "firewall-diagnostics" {
name = "${azurerm_firewall.firewall.name}-diagnostics"
name = "${azurerm_firewall.firewall.name}-fw-diagnostics"
target_resource_id = azurerm_firewall.firewall.id
storage_account_id = azurerm_storage_account.loganalytics.id
log_analytics_workspace_id = var.log_analytics_workspace_id
Expand All @@ -85,7 +85,7 @@ resource "azurerm_monitor_diagnostic_setting" "firewall-diagnostics" {
}

resource "azurerm_monitor_diagnostic_setting" "publicip-diagnostics" {
name = "${azurerm_public_ip.firewall.name}-diagnostics"
name = "${azurerm_public_ip.firewall.name}-pip-diagnostics"
target_resource_id = azurerm_public_ip.firewall.id
storage_account_id = azurerm_storage_account.loganalytics.id
log_analytics_workspace_id = var.log_analytics_workspace_id
Expand Down
2 changes: 1 addition & 1 deletion src/modules/subnet/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ locals {
}

resource "azurerm_monitor_diagnostic_setting" "nsg" {
name = "${azurerm_network_security_group.nsg.name}-diagnostics"
name = "${azurerm_network_security_group.nsg.name}-nsg-diagnostics"
target_resource_id = azurerm_network_security_group.nsg.id
storage_account_id = var.log_analytics_storage_id
log_analytics_workspace_id = var.log_analytics_workspace_id
Expand Down
2 changes: 1 addition & 1 deletion src/modules/virtual-network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ resource "azurerm_storage_account" "loganalytics" {
}

resource "azurerm_monitor_diagnostic_setting" "vnet" {
name = "${var.vnet_name}-diagnosticsetting"
name = "${var.vnet_name}-vn-diagnostics"
target_resource_id = azurerm_virtual_network.vnet.id
storage_account_id = azurerm_storage_account.loganalytics.id
log_analytics_workspace_id = var.log_analytics_workspace_id
Expand Down

0 comments on commit cd5d2aa

Please sign in to comment.