Method: Inspec::Resources::AzureVirtualMachine#initialize

Defined in:
lib/resources/azure/azure_virtual_machine.rb

#initialize(opts = {}) ⇒ AzureVirtualMachine

Constructor for the resource. This calls the parent constructor to get the generic resource for the specified machine. This will provide static methods that are documented

Author:

  • Russell Seymour



20
21
22
23
24
25
26
27
28
29
# File 'lib/resources/azure/azure_virtual_machine.rb', line 20

def initialize(opts = {})
  # The generic resource needs to pass back a Microsoft.Compute/virtualMachines object so force it
  opts[:type] = 'Microsoft.Compute/virtualMachines'
  super(opts)

  # Find the virtual machines
  resources

  create_tag_methods
end