2019-03-04 15:33:37 +00:00
|
|
|
# copyright: 2018, The Authors
|
|
|
|
|
2019-06-11 22:24:35 +00:00
|
|
|
title "Sample Section"
|
2019-03-04 15:33:37 +00:00
|
|
|
|
|
|
|
# you add controls here
|
2019-06-11 22:24:35 +00:00
|
|
|
control "azure-virtual-machines-exist-check" do # A unique ID for this control.
|
2019-03-04 15:33:37 +00:00
|
|
|
impact 1.0 # The criticality, if this control fails.
|
2019-06-11 22:24:35 +00:00
|
|
|
title "Check resource groups to see if any VMs exist." # A human-readable title
|
2019-03-04 15:33:37 +00:00
|
|
|
azurerm_resource_groups.names.each do |resource_group_name| # Plural resources can be leveraged to loop across many resources
|
|
|
|
describe azurerm_virtual_machines(resource_group: resource_group_name) do
|
2019-06-11 22:24:35 +00:00
|
|
|
it { should exist } # The test itself.
|
2019-03-04 15:33:37 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|