Unable to use "encryption_at_host_enabled" in terraform code,

Please see my reply to the similar question posted in the Terraform category.

The azurerm_virtual_machine resource does not support that argument. You will need to change your module to use the (newer) azurerm_linux_virtual_machine resource which does support it.

How to implement “encryption_at_host_enabled” using terraform - Terraform - HashiCorp Discuss