lib/terraforming/resource/eip.rb in terraforming-0.9.1 vs lib/terraforming/resource/eip.rb in terraforming-0.10.0
- old
+ new
@@ -27,13 +27,13 @@
"id" => addr.allocation_id,
"instance" => addr.instance_id,
"network_interface" => addr.network_interface_id,
"private_ip" => addr.private_ip_address,
"public_ip" => addr.public_ip,
- "vpc" => is_vpc?(addr).to_s,
+ "vpc" => vpc?(addr).to_s,
}
- attributes.delete_if{|k, v| v.nil?}
+ attributes.delete_if { |_k, v| v.nil? }
resources["aws_eip.#{addr.allocation_id}"] = {
"type" => "aws_eip",
"primary" => {
"id" => addr.allocation_id,
"attributes" => attributes
@@ -45,13 +45,13 @@
end
private
def eips
- @client.describe_addresses.addresses
+ @client.describe_addresses.map(&:addresses).flatten
end
- def is_vpc?(addr)
+ def vpc?(addr)
addr.domain.eql?("vpc")
end
end
end
end