Class: Chef::Resource::AwsEipAddress

Inherits:
Provisioning::AWSDriver::AWSResourceWithEntry
  • Object
show all
Defined in:
lib/chef/resource/aws_eip_address.rb

Instance Method Summary collapse

Instance Method Details

#action(*args) ⇒ Object



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/chef/resource/aws_eip_address.rb', line 46

def action(*args)
  # Backcompat for associate and disassociate
  if args == [ :associate ]
    super(:create)
  elsif args == [ :disassociate ]
    machine false
    super(:create)
  else
    super
  end
end

#aws_objectObject



40
41
42
43
44
# File 'lib/chef/resource/aws_eip_address.rb', line 40

def aws_object
  driver, public_ip = get_driver_and_id
  result = driver.ec2.elastic_ips[public_ip] if public_ip
  result && result.exists? ? result : nil
end