Testing VM disk encryption


#1

I'm trying to have InSpec test the disks attached to my VMs in Azure by running the following:

describe azurerm_virtual_machine_disk(resource_group: 'xxx_xxx', name: 'xxx_xxx') do
it { should exist }
it('encryption_enabled') { should be true }
its('disk_encryption') { should eq('On') }
its('storage_encryption') { should eq('On') }

In the Inspec.yml I have the following defined: https://github.com/inspec/inspec-azure.git

The responses I'm getting are:

:heavy_check_mark: 'xxx_xxx' Disk should exist

× 'xxx_xxx' Disk encryption_enabled

 expected true
      got #<#<Class:0x00007f8cb89ad9d0>:70121145957460> => 'xxx_xxx' Disk

 ×  'xxx_xxx' Disk disk_encryption undefined method `disk_encryption' for 'xxx_xxx' Disk:# Class:0x00007fcf3d82ecb8>

 ×  'xxxx_xxx' Disk storage_encryption undefined method `storage_encryption' for 'xxx_xxx' Disk:#<Class:0x00007fcf3d82ecb8>

What am I doing wrong?