How to implement "encryption_at_host_enabled" ussing terraform

I am implementing “encryption_at_host_enabled”, inside my vm for os-disk and data_disk. But while getting the plan, I am getting
Error: Unsupported argument

on main.tf line 73, in resource “azurerm_virtual_machine” “vm-linux”:
73: encryption_at_host_enabled = true

An argument named “encryption_at_host_enabled” is not expected here.

Please help

Hi @vaibhavsingh_balwant,

This is more a question related to the AzureRM provider and would be better located in the Terraform providers category, but the below should help:

As per the documentation for azurerm_virtual_machine that argument is not supported.

However, the azurerm_virtual_machine resource has been superseded by the azurerm_linux_virtual_machine and azurerm_windows_virtual_machine resources (see the note at the top of the azurerm_virtual_machine page.)

The good news is that the new azurerm_linux_virtual_machine resource does support the encryption_at_host_enabled argument. If you update your module to use the newer azurerm_linux_virtual_machine resource then you can enable encryption at host using the argument you have been trying.

HTH

Happy Terraforming

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.