mirror of
https://github.com/inspec/inspec
synced 2024-09-21 06:51:56 +00:00
Renamed azure_rg resource
Closes #25 Signed-off-by: Russell Seymour <russell.seymour@turtlesystems.co.uk>
This commit is contained in:
parent
6f57529a44
commit
7842d37fb3
3 changed files with 5 additions and 5 deletions
|
@ -113,7 +113,7 @@ end
|
|||
|
||||
### Available Resources
|
||||
|
||||
- `azure_rg` - This resource reads information about the resources in the specified resource group
|
||||
- `azure_resource_group` - This resource reads information about the resources in the specified resource group
|
||||
|
||||
| Resource Name | Resources | Description |
|
||||
|---------------|-----------|-------------|
|
||||
|
@ -136,7 +136,7 @@ control 'azure-1' do
|
|||
impact 1.0
|
||||
title 'Checks that there is only one storage account in the resource group'
|
||||
|
||||
describe azure_rg(name: 'MyResourceGroup').where { type == 'Microsoft.Storage/storageAccounts' }.entries do
|
||||
describe azure_resource_group(name: 'MyResourceGroup').where { type == 'Microsoft.Storage/storageAccounts' }.entries do
|
||||
its('count') { should eq 1 }
|
||||
end
|
||||
end
|
||||
|
@ -149,7 +149,7 @@ control 'azure-1' do
|
|||
impact 1.0
|
||||
title 'Checks a resource with the name "example-VM" exists'
|
||||
|
||||
describe azure_rg(name: 'MyResourceGroup').contains(parameter: 'name', value: 'example-VM') do
|
||||
describe azure_resource_group(name: 'MyResourceGroup').contains(parameter: 'name', value: 'example-VM') do
|
||||
it { should be true }
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,7 +9,7 @@ require 'azure_backend'
|
|||
# @attr_reader [Azure::ARM::Resources::Models::ResourceGroup] rg Resource group under interrogation
|
||||
# @attr_reader [Hashtable] counts Hashtable containing the counts of the different types in the resource group
|
||||
class AzureRg < Inspec.resource(1)
|
||||
name 'azure_rg'
|
||||
name 'azure_resource_group'
|
||||
|
||||
desc "
|
||||
This resource returns information about the specified resource group
|
|
@ -7,7 +7,7 @@ control 'azure-resources-1.0' do
|
|||
title 'Check that the resource group has the correct resources'
|
||||
|
||||
# Ensure that the expected resources have been deployed
|
||||
describe azure_rg(name: 'Inspec-Azure') do
|
||||
describe azure_resource_group(name: 'Inspec-Azure') do
|
||||
its('total') { should eq 7 }
|
||||
its('vm_count') { should eq 2 }
|
||||
its('nic_count') { should eq 2 }
|
||||
|
|
Loading…
Reference in a new issue