No http on Windows Server 2016 Datacenter VM?

Hi,

I'm trying out InSpec to test our infrastructure in Azure. I've got a simple check working that checks if one of the VMs has IIS installed. But when I try a simple test that checks if the same VM can access a certain internal web service it fails.

My script:

describe http('http://dev-consul-1.xxxxxxxxxx:8500') do
  its('status') { should cmp 301 }
end

The error when running:

Unsupported resource/backend combination: http / windows_server_2016_datacenter. Exiting.

That sounds like http is not supported on this type of VM. Am I right? If so, is there a way I can work around this?

I'm using InSpec version 4.18.24.

Thanks in advance!

Cheers,

Ongoonku

Hello Ongoonku,
Unfortunately, inspec does not support the http resource on Windows at this time - see https://github.com/inspec/inspec/issues/3959 for details. One alternative until such support is added would be to use the powershell resource to fetch the URL you are looking for.

Cheers,
Clinton Wolfe

Hi Clinton,

Thanks, searching for my problem didn't turn up that issue. Good to know.
Is this mentioned anywhere in the documentation?

Cheers,

Ongoonku