Skip to content

Commit

Permalink
Remove nonprod condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ieuanb74 committed Sep 5, 2024
1 parent 75c97ad commit 358fc68
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions azure_monitor.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ data "azurerm_monitor_data_collection_rule" "windows_data_collection_rule" {


resource "azurerm_monitor_data_collection_rule_association" "linux_vm_dcra" {
count = var.install_azure_monitor == true && lower(var.os_type) == "linux" && var.virtual_machine_type == "vm" && contains(["nonprod"], var.env) ? 1 : 0
count = var.install_azure_monitor == true && lower(var.os_type) == "linux" && var.virtual_machine_type == "vm" ? 1 : 0

name = "vm-${local.vm_name}-dcra"
target_resource_id = var.virtual_machine_id
Expand All @@ -54,7 +54,7 @@ resource "azurerm_monitor_data_collection_rule_association" "linux_vm_dcra" {
}

resource "azurerm_monitor_data_collection_rule_association" "linux_vmss_dcra" {
count = var.install_azure_monitor == true && lower(var.os_type) == "linux" && var.virtual_machine_type == "vmss" && contains(["nonprod"], var.env) ? 1 : 0
count = var.install_azure_monitor == true && lower(var.os_type) == "linux" && var.virtual_machine_type == "vmss" ? 1 : 0

name = "vmss-${local.vmss_name}-dcra"
target_resource_id = var.virtual_machine_scale_set_id
Expand All @@ -63,7 +63,7 @@ resource "azurerm_monitor_data_collection_rule_association" "linux_vmss_dcra" {
}

resource "azurerm_monitor_data_collection_rule_association" "windows_vm_dcra" {
count = var.install_azure_monitor == true && lower(var.os_type) == "windows" && var.virtual_machine_type == "vm" && contains(["nonprod"], var.env) ? 1 : 0
count = var.install_azure_monitor == true && lower(var.os_type) == "windows" && var.virtual_machine_type == "vm" ? 1 : 0

name = "vm-${local.vm_name}-dcra"
target_resource_id = var.virtual_machine_id
Expand All @@ -72,7 +72,7 @@ resource "azurerm_monitor_data_collection_rule_association" "windows_vm_dcra" {
}

resource "azurerm_monitor_data_collection_rule_association" "windows_vmss_dcra" {
count = var.install_azure_monitor == true && lower(var.os_type) == "windows" && var.virtual_machine_type == "vmss" && contains(["nonprod"], var.env) ? 1 : 0
count = var.install_azure_monitor == true && lower(var.os_type) == "windows" && var.virtual_machine_type == "vmss" ? 1 : 0

name = "vmss-${local.vmss_name}-dcra"
target_resource_id = var.virtual_machine_scale_set_id
Expand Down

0 comments on commit 358fc68

Please sign in to comment.