mirror of
https://github.com/puppetmaster/typhoon.git
synced 2025-07-22 10:11:34 +02:00
Avoid unneeded rotations of Regular priority virtual machine scale sets
* Azure only allows `eviction_policy` to be set for Low priority VMs. Supporting Low priority VMs meant when Regular VMs were used, each `terraform apply` rolled workers, to set eviction_policy to null. * Terraform v0.12 nullable variables fix the issue and plan does not produce a diff
This commit is contained in:
@ -68,8 +68,9 @@ resource "azurerm_virtual_machine_scale_set" "workers" {
|
||||
|
||||
# lifecycle
|
||||
upgrade_policy_mode = "Manual"
|
||||
# eviction policy may only be set when priority is Low
|
||||
priority = var.priority
|
||||
eviction_policy = "Delete"
|
||||
eviction_policy = var.priority == "Low" ? "Delete" : null
|
||||
}
|
||||
|
||||
# Scale up or down to maintain desired number, tolerating deallocations.
|
||||
|
Reference in New Issue
Block a user