Class: Chef::Resource::AzureNetworkInterface

Inherits:
Provisioning::AzureRM::AzureResource show all
Defined in:
lib/chef/resource/azure_network_interface.rb

Instance Attribute Summary collapse

Attributes inherited from Provisioning::AzureRM::AzureResource

#driver, #driver_name, #subscription_id

Instance Method Summary collapse

Methods inherited from Provisioning::AzureRM::AzureResource

#initialize

Constructor Details

This class inherits a constructor from Chef::Provisioning::AzureRM::AzureResource

Instance Attribute Details

#public_ip_resourceObject (readonly)

Returns the value of attribute public_ip_resource.



30
31
32
# File 'lib/chef/resource/azure_network_interface.rb', line 30

def public_ip_resource
  @public_ip_resource
end

Instance Method Details

#public_ip(resource_name, &resource_block) ⇒ Object



32
33
34
35
36
# File 'lib/chef/resource/azure_network_interface.rb', line 32

def public_ip(resource_name, &resource_block)
  @public_ip_resource = Chef::Resource::AzurePublicIPAddress.new(resource_name.to_s, run_context)
  @public_ip_resource.action :nothing
  @public_ip_resource.instance_eval(&resource_block)
end