Description
If you need to protect temporary disks and disk caches on the VM host, check support for encryption at host on the VM size, in its region and in your subscription. Managed disks already have encryption at rest.
Potential impact
Built-in host protection varies by VM size. A VM that uses or previously used Azure Disk Encryption cannot enable encryption at host in place.
Remediation
Set encryption_at_host_enabled = true on a compatible scale set. New instances use the setting. For existing instances, plan for the downtime needed to deallocate and reallocate them and verify the setting on each one. Follow the documented migration for VMs with a history of ADE.
Examples
The examples describe the same two-instance Windows scale set. Choose a supported SKU and supply the OS disk, image and networking settings.
Before
resource "azurerm_windows_virtual_machine_scale_set" "example" {
name = "example-vmss"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
sku = "Standard_F2"
instances = 2
admin_username = var.admin_username
admin_password = var.admin_password
computer_name_prefix = "example"
encryption_at_host_enabled = false
}
After
resource "azurerm_windows_virtual_machine_scale_set" "example" {
name = "example-vmss"
resource_group_name = azurerm_resource_group.example.name
location = azurerm_resource_group.example.location
sku = "Standard_F2"
instances = 2
admin_username = var.admin_username
admin_password = var.admin_password
computer_name_prefix = "example"
encryption_at_host_enabled = true
}