class GeoEngineer::Resources::AwsNetworkInterface

AwsNetworkInterface is the aws_network_interface terrform resource,

{www.terraform.io/docs/providers/aws/r/network_interface.html Terraform Docs}

Public Class Methods

_fetch_remote_resources(provider) click to toggle source
# File lib/geoengineer/resources/aws_network_interface.rb, line 12
def self._fetch_remote_resources(provider)
  interfaces = AwsClients.ec2(provider).describe_network_interfaces

  interfaces['network_interfaces'].map(&:to_h).map do |interface|
    addresses = interface[:private_ip_addresses].collect { |a| a[:private_ip_address] }
    interface[:_terraform_id] = interface[:network_interface_id]
    interface[:_geo_id] = addresses.join(',')
    interface
  end
end