Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
fix(examples/standalone_panorama): fix to be deployable with the defa…
Browse files Browse the repository at this point in the history
…ults (#365)
  • Loading branch information
FoSix authored Dec 6, 2023
1 parent 0b562c6 commit 2890938
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
21 changes: 10 additions & 11 deletions examples/standalone_panorama/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
9 changes: 6 additions & 3 deletions modules/panorama/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2890938

Please sign in to comment.