Enable boot diagnostics for Azure controller and worker VMs

* When invalid Ignition snippets are provided to Typhoon, it
can be useful to view Azure's boot logs for the instance, which
requires boot diagnostics be enabled
This commit is contained in:
Dalton Hubble
2023-06-11 19:20:45 -07:00
parent 58e0ff9f5e
commit 784f60f624
3 changed files with 14 additions and 1 deletions

View File

@ -17,6 +17,9 @@ resource "azurerm_linux_virtual_machine_scale_set" "workers" {
computer_name_prefix = "${var.name}-worker"
single_placement_group = false
custom_data = base64encode(data.ct_config.worker.rendered)
boot_diagnostics {
# defaults to a managed storage account
}
# storage
os_disk {
@ -69,6 +72,9 @@ resource "azurerm_linux_virtual_machine_scale_set" "workers" {
# eviction policy may only be set when priority is Spot
priority = var.priority
eviction_policy = var.priority == "Spot" ? "Delete" : null
termination_notification {
enabled = true
}
}
# Scale up or down to maintain desired number, tolerating deallocations.