diff --git a/examples/standalone_panorama/main.tf b/examples/standalone_panorama/main.tf index b39c702b..84d93e6d 100644 --- a/examples/standalone_panorama/main.tf +++ b/examples/standalone_panorama/main.tf @@ -60,17 +60,16 @@ module "panorama" { for_each = var.panoramas - name = "${var.name_prefix}${each.value.name}" - resource_group_name = local.resource_group.name - location = var.location - avzone = try(each.value.avzone, null) - avzones = try(each.value.avzones, ["1", "2", "3"]) - enable_zones = var.enable_zones - custom_image_id = try(each.value.custom_image_id, null) - panorama_sku = var.panorama_sku - panorama_size = try(each.value.size, var.panorama_size) - panorama_version = try(each.value.version, var.panorama_version) - boot_diagnostic_storage_uri = "" + name = "${var.name_prefix}${each.value.name}" + resource_group_name = local.resource_group.name + location = var.location + avzone = try(each.value.avzone, null) + avzones = try(each.value.avzones, ["1", "2", "3"]) + enable_zones = var.enable_zones + custom_image_id = try(each.value.custom_image_id, null) + panorama_sku = var.panorama_sku + panorama_size = try(each.value.size, var.panorama_size) + panorama_version = try(each.value.version, var.panorama_version) interfaces = [for v in each.value.interfaces : { name = "${var.name_prefix}${each.value.name}-${v.name}" diff --git a/modules/panorama/main.tf b/modules/panorama/main.tf index 2f92fbc3..12d0e0d8 100644 --- a/modules/panorama/main.tf +++ b/modules/panorama/main.tf @@ -74,9 +74,12 @@ resource "azurerm_virtual_machine" "panorama" { admin_password = var.password } - boot_diagnostics { - enabled = var.boot_diagnostic_storage_uri != null ? true : false - storage_uri = var.boot_diagnostic_storage_uri + dynamic "boot_diagnostics" { + for_each = var.boot_diagnostic_storage_uri != null ? [1] : [] + content { + enabled = true + storage_uri = var.boot_diagnostic_storage_uri + } } os_profile_linux_config {