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



43
44
45
46
47
48
49
50
51
52
53
# File 'lib/chef/resource/aws_eip_address.rb', line 43

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



37
38
39
40
41
# File 'lib/chef/resource/aws_eip_address.rb', line 37

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