Skip to content

Commit

Permalink
Merge pull request aztfmod#1825 from olandese/feature/update-vm-module
Browse files Browse the repository at this point in the history
Add secure_boot_enabled and vtpm_enabled options
  • Loading branch information
arnaudlh authored Oct 17, 2023
2 parents 926372a + 4845926 commit 5bb7887
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions modules/compute/virtual_machine/vm_linux.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,16 @@ resource "azurerm_linux_virtual_machine" "vm" {
size = each.value.size
tags = merge(local.tags, try(each.value.tags, null))
zone = try(each.value.zone, null)
secure_boot_enabled = try(each.value.secure_boot_enabled, null)
vtpm_enabled = try(each.value.vtpm_enabled, null)


custom_data = try(
try(
try(local_sensitive_file.custom_data[each.key].content_base64, local.dynamic_custom_data[each.value.custom_data][each.value.name]),
try(filebase64(format("%s/%s", path.cwd, each.value.custom_data)), base64encode(each.value.custom_data))),
try(filebase64(format("%s/%s", path.cwd, each.value.custom_data)), base64encode(each.value.custom_data))),
null)


dedicated_host_id = can(each.value.dedicated_host.key) ? var.dedicated_hosts[try(each.value.dedicated_host.lz_key, var.client_config.landingzone_key)][each.value.dedicated_host.key].id : try(each.value.dedicated_host.id, null)

Expand Down
3 changes: 3 additions & 0 deletions modules/compute/virtual_machine/vm_windows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ resource "azurerm_windows_virtual_machine" "vm" {
tags = merge(local.tags, try(each.value.tags, null))
timezone = try(each.value.timezone, null)
zone = try(each.value.zone, null)
secure_boot_enabled = try(each.value.secure_boot_enabled, null)
vtpm_enabled = try(each.value.vtpm_enabled, null)


custom_data = try(
try(filebase64(format("%s/%s", path.cwd, each.value.custom_data)), base64encode(each.value.custom_data)),
Expand Down

0 comments on commit 5bb7887

Please sign in to comment.