inspec/examples/profile-azure/controls/azure_resource_group_example.rb
Jerry Aldrich 9616ebf19a Add example profiles for AWS/Azure (#2680)
* Add example AWS profile

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>

* Add example Azure profile

Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com>
2018-02-18 12:12:44 +01:00

24 lines
771 B
Ruby

control 'azure_resource_group_example' do
title 'Check if the Example Resource Group matches expectations'
impact 1.0
describe azure_resource_group(name: 'Inspec-Azure') do
# Check if the Resource Group is located in the correct region
its('location') { should cmp 'westeurope' }
# Check if the Resource Group has tags
it { should have_tags }
# Check if the number of VMs in the Resource Group is correct
its('vm_count') { should eq 3 }
# Check if the number of public IPs is correct
its('public_ip_count') { should eq 1 }
# Check if the number of Network Security Groups is correct
its('nsg_count') { should eq 1 }
# Check if the number of Storage Accounts is correct
its('sa_count') { should eq 1 }
end
end