Skip to content

Commit

Permalink
additional_capabilities block should only be set if true
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelamattes committed May 10, 2022
1 parent ff3168e commit a4393e8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ resource "azurerm_linux_virtual_machine" "linux_virtual_machine" {
}
}

additional_capabilities {
ultra_ssd_enabled = local.linux_virtual_machine[each.key].additional_capabilities.ultra_ssd_enabled
dynamic "additional_capabilities" {
for_each = local.linux_virtual_machine[each.key].additional_capabilities.ultra_ssd_enabled != false ? [1] : []

content {
ultra_ssd_enabled = local.linux_virtual_machine[each.key].additional_capabilities.ultra_ssd_enabled
}
}

dynamic "boot_diagnostics" {
Expand Down

0 comments on commit a4393e8

Please sign in to comment.